@@ -1752,51 +1752,62 @@ def manimation(
1752
1752
) -> Scene | Callable [[Callable [[Scene ], object ]], Scene ]:
1753
1753
"""A short-hand decorator for creating an animation from a construct-like function.
1754
1754
1755
- This decorator creates a :class:`.Scene` object whose ``construct`` method
1756
- is created from the specified function. This allows to write (and render)
1757
- scenes in a short-hand manner::
1755
+ This decorator creates a :class:`.Scene` object whose ``construct`` method
1756
+ is created from the specified function. This allows to write (and render)
1757
+ scenes in a short-hand manner::
1758
1758
1759
- @manimation
1760
- def hello_world(scene: Scene):
1761
- t = Text("Hello World!")
1762
- scene.play(Write(t))
1763
- scene.play(t.animate.scale(2))
1764
- scene.wait()
1759
+ @manimation
1760
+ def hello_world(scene: Scene):
1761
+ t = Text("Hello World!")
1762
+ scene.play(Write(t))
1763
+ scene.play(t.animate.scale(2))
1764
+ scene.wait()
1765
1765
1766
+ <<<<<<< HEAD
1766
1767
1767
- hello_world.render()
1768
+ =======
1769
+ >>>>>>> 7f23849dbf3b4dabccc083e4b37efe9458d3b78d
1770
+ hello_world.render()
1768
1771
1769
- This is equivalent to the following, *classical* way of creating and rendering
1770
- a scene::
1772
+ This is equivalent to the following, *classical* way of creating and rendering
1773
+ a scene::
1771
1774
1772
- class HelloWorld(Scene):
1773
- def construct(self):
1774
- t = Text("Hello World!")
1775
- self.play(Write(t))
1776
- self.play(t.animate.scale(2))
1777
- self.wait()
1775
+ class HelloWorld(Scene):
1776
+ def construct(self):
1777
+ t = Text("Hello World!")
1778
+ self.play(Write(t))
1779
+ self.play(t.animate.scale(2))
1780
+ self.wait()
1778
1781
1782
+ <<<<<<< HEAD
1779
1783
1780
- scene_object = HelloWorld()
1781
- scene_object.render()
1784
+ =======
1785
+ >>>>>>> 7f23849dbf3b4dabccc083e4b37efe9458d3b78d
1786
+ scene_object = HelloWorld()
1787
+ scene_object.render()
1782
1788
1783
- Parameters
1784
- ----------
1785
- construct_function
1786
- The (decorated) function that will be used to construct the scene.
1787
- scene_class
1788
- The base class that is used to construct the scene.
1789
+ Parameters
1790
+ ----------
1791
+ construct_function
1792
+ The (decorated) function that will be used to construct the scene.
1793
+ scene_class
1794
+ The base class that is used to construct the scene.
1789
1795
1790
- Examples
1791
- --------
1796
+ Examples
1797
+ --------
1792
1798
1793
- An example for a scene using a different base class for the scene::
1799
+ An example for a scene using a different base class for the scene::
1794
1800
1795
- @manimation(scene_class=MovingCameraScene)
1796
- def moving_around(scene: MovingCameraScene): ...
1801
+ @manimation(scene_class=MovingCameraScene)
1802
+ <<<<<<< HEAD
1803
+ def moving_around(scene: MovingCameraScene): ...
1804
+ =======
1805
+ def moving_around(scene: MovingCameraScene):
1806
+ ...
1807
+ >>>>>>> 7f23849dbf3b4dabccc083e4b37efe9458d3b78d
1797
1808
1798
- Note that the type hint for the scene class is optional and just
1799
- helps your IDE to suggest the correct auto-completion options.
1809
+ Note that the type hint for the scene class is optional and just
1810
+ helps your IDE to suggest the correct auto-completion options.
1800
1811
"""
1801
1812
1802
1813
def scene_decorator (construct : Callable [[Scene ], None ]) -> Scene :
0 commit comments