A community-maintained Python framework for creating mathematical animations.
add some other modules to the API reference
leotrscf66a22a4ca2
diff --git a/docs/source/_templates/autosummary/class.rst b/docs/source/_templates/autosummary/class.rstindex 79c5dd365..5944fc12f 100644--- a/docs/source/_templates/autosummary/class.rst+++ b/docs/source/_templates/autosummary/class.rst@@ -11,7 +11,7 @@.. autosummary:::nosignatures::toctree: .- {% for item in methods if item != '__init__' %}+ {% for item in methods if item != '__init__' and item not in inherited_members %}~{{ name }}.{{ item }}{%- endfor %}{% endif %}diff --git a/docs/source/reference.rst b/docs/source/reference.rstindex 21c206f8a..8c252b422 100644--- a/docs/source/reference.rst+++ b/docs/source/reference.rst@@ -6,7 +6,7 @@ Manim, describing what they are and what they do. For learning how to useManim, see :doc:`tutorials`. For a list of changes since the last release, seethe :doc:`changelog`.-.. warning:: The paged linked to here are currently a work in progress.+.. warning:: The pages linked to here are currently a work in progress.List of Modules@@ -14,13 +14,60 @@ List of Modules.. currentmodule:: manim+**Mathematical Objects**+.. autosummary:::toctree: reference- container~mobject.mobject+ ~mobject.types.vectorized_mobject+ ~mobject.geometry+ ~mobject.number_line+ ~mobject.svg.svg_mobject+++**Scenes**++.. autosummary::+ :toctree: reference++ ~scene.scene+ ~scene.zoomed_scene+ ~scene.moving_camera_scene+++**Animations**++.. autosummary::+ :toctree: reference++ ~animation.animation+ ~animation.creation+ ~animation.fading+ ~animation.composition+++**Cameras**++.. autosummary::+ :toctree: reference++ ~camera.camera+ ~camera.mapping_camera+ ~camera.moving_camera+ ~camera.multi_camera+ ~camera.three_d_camera+++**Other modules**++.. autosummary::+ :toctree: reference+configconstants+ container+.. This is here so that sphinx doesn't complain about changelog.rst not beingincluded in any toctreediff --git a/docs/source/tutorials/quickstart.rst b/docs/source/tutorials/quickstart.rstindex 01c21d7c7..672b3bf93 100644--- a/docs/source/tutorials/quickstart.rst+++ b/docs/source/tutorials/quickstart.rst@@ -4,7 +4,7 @@ QuickstartThis document will lead you step by step through the necessary procedure to getstarted with manim for the first time as soon as possible. This tutorialassumes you have already installed manim following the steps in-:doc:`../installation/installation_index`.+:doc:`../installation`.Start a new project@@ -15,7 +15,7 @@ folder where all of the files related to the video will reside. For thisexample, this folder will be called ``project``,.. code-block:: bash-+project/Every file containing code that produces a video with manim will be stored@@ -30,7 +30,7 @@ To produce your first scene, create a new file in your project folder called``scene.py``,.. code-block:: bash-+project/└─scene.py@@ -39,7 +39,7 @@ and copy the following code in it... code-block:: pythonfrom manim import *-+# all code must be contained inside the construct# method of a class that inherits from Sceneclass SquareToCircle(Scene):@@ -79,16 +79,16 @@ Our scene is a little basic, so let's add some bells and whistles. Modify the.. code-block:: pythonfrom manim import *-+class SquareToCircle(Scene):def construct(self):circle = Circle() # create a circlecircle.set_fill(PINK, opacity=0.5) # set color and transparency-+square = Square() # create a squaresquare.flip(RIGHT) # flip horizontallysquare.rotate(-3 * TAU / 8) # rotate a certain amount-+self.play(ShowCreation(square)) # animate the creation of the squareself.play(Transform(square, circle)) # interpolate the square into the circleself.play(FadeOut(square)) # fade out animation@@ -118,5 +118,5 @@ is now time to start creating awesome mathematical animations. For a lookunder the hood at what manim is doing when rendering the ``SquareToCircle``scene, see the next tutorial :doc:`a_deeper_look`. For an extensive review ofmanim's features, as well as its configuration and other settings, see the-other :doc:`tutorials_index`. For a list of all available features, see the+other :doc:`../tutorials`. For a list of all available features, see the:doc:`../reference` page.diff --git a/manim/scene/scene.py b/manim/scene/scene.pyindex edb96f512..7a59e891f 100644--- a/manim/scene/scene.py+++ b/manim/scene/scene.py@@ -21,14 +21,17 @@ from ..utils.hashing import get_hash_from_play_call, get_hash_from_wait_callclass Scene(Container):- """- A Scene can be thought of as the Canvas of your animation.- All of your own named Scenes will be subclasses of this Scene, or- other named scenes.+ """A Scene is the canvas of your animation.++ All of your own named Scenes will be subclasses of Scene, or other named+ scenes.- Use a construct() function to tell Manim what should go on in the Scene.+ Examples+ --------+ Override the construct() method to tell Manim what should go on in the+ Scene.- E.G:+ .. code-block:: pythonclass MyScene(Scene):def construct(self):@@ -44,6 +47,7 @@ class Scene(Container):num_plays : Number of play() functions in the scene.time: time elapsed since initialisation of scene.random_seed: The seed with which all random operations are done.+"""CONFIG = {@@ -109,8 +113,8 @@ class Scene(Container):def print_end_message(self):"""Used internally to print the number of- animations played after the scene ends,- as well as the name of the scene rendered+ animations played after the scene ends,+ as well as the name of the scene rendered(useful when using the `-a` option)."""logger.info(f"Rendered {str(self)}\nPlayed {self.num_plays} animations")@@ -227,9 +231,10 @@ class Scene(Container):ignore_skipping=True,**kwargs,):- """- Parameters:- -----------+ """Update the frame.++ Parameters+ ----------mobjects: list, optionallist of mobjects@@ -853,10 +858,10 @@ class Scene(Container):Decorator that returns a wrapped version of func that will compute the hash of the play invocation.The returned function will act according to the computed hash: either skip the animation because it's already cached, or let the invoked function play normally.-+Parameters----------- func : Callable[[...], None]+ func : Callable[[...], None]The play like function that has to be written to the video file stream. Take the same parameters as `scene.play`."""