A community-maintained Python framework for creating mathematical animations.
fix documentation links
Devin Neal57b96fdd0797
diff --git a/docs/source/animation.rst b/docs/source/animation.rstindex 3fe878d57..e38db6333 100644--- a/docs/source/animation.rst+++ b/docs/source/animation.rst@@ -16,7 +16,13 @@ Animation are used in conjunction with ``scene.Play``Fade-----FadeIn :download:`/assets/AnimationFadeIn.mp4`::+.. raw:: html++ <video width="560" height="315" controls>+ <source src="_static/AnimationFadeIn.mp4" type="video/mp4">+ </video>++.. code-block:: pythonclass AnimationFadeIn(Scene):def construct(self):@@ -27,9 +33,13 @@ FadeIn :download:`/assets/AnimationFadeIn.mp4`::self.add(anno)self.play(FadeIn(square))+.. raw:: html+ <video width="560" height="315" controls>+ <source src="_static/AnimationFadeOut.mp4" type="video/mp4">+ </video>-FadeOut :download:`/assets/AnimationFadeOut.mp4`::+.. code-block:: pythonclass AnimationFadeOut(Scene):def construct(self):@@ -43,7 +53,13 @@ FadeOut :download:`/assets/AnimationFadeOut.mp4`::-FadeInFrom :download:`/assets/AnimationFadeInFrom.mp4`::+.. raw:: html++ <video width="560" height="315" controls>+ <source src="_static/AnimationFadeInFrom.mp4" type="video/mp4">+ </video>++.. code-block:: pythonclass AnimationFadeInFrom(Scene):def construct(self):@@ -60,7 +76,13 @@ FadeInFrom :download:`/assets/AnimationFadeInFrom.mp4`::-FadeOutAndShift :download:`assets/AnimationFadeOutAndShift.mp4`::+.. raw:: html++ <video width="560" height="315" controls>+ <source src="_static/AnimationFadeOutAndShift.mp4" type="video/mp4">+ </video>++.. code-block:: pythonclass AnimationFadeOutAndShift(Scene):def construct(self):@@ -77,7 +99,13 @@ FadeOutAndShift :download:`assets/AnimationFadeOutAndShift.mp4`::-FadeInFromLarge :download:`assets/AnimationFadeInFromLarge.mp4`::+.. raw:: html++ <video width="560" height="315" controls>+ <source src="_static/AnimationFadeInFromLarge.mp4" type="video/mp4">+ </video>++.. code-block:: pythonclass AnimationFadeInFromLarge(Scene):def construct(self):@@ -91,9 +119,13 @@ FadeInFromLarge :download:`assets/AnimationFadeInFromLarge.mp4`::self.play(FadeInFromLarge(square, scale_factor=factor))self.remove(anno, square)+.. raw:: html+ <video width="560" height="315" controls>+ <source src="_static/AnimationFadeInFromPoint.mp4" type="video/mp4">+ </video>-FadeInFromPoint :download:`assets/AnimationFadeInFromPoint.mp4`::+.. code-block:: pythonclass AnimationFadeInFromPoint(Scene):def construct(self):@@ -110,7 +142,13 @@ FadeInFromPoint :download:`assets/AnimationFadeInFromPoint.mp4`::Grow-----GrowFromEdge :download:`assets/AnimationGrowFromEdge.mp4`::+.. raw:: html++ <video width="560" height="315" controls>+ <source src="_static/AnimationGrowFromEdge.mp4" type="video/mp4">+ </video>++.. code-block:: pythonclass AnimationGrowFromEdge(Scene):def construct(self):@@ -127,7 +165,13 @@ GrowFromEdge :download:`assets/AnimationGrowFromEdge.mp4`::-GrowFromCenter :download:`assets/AnimationGrowFromCenter.mp4`::+.. raw:: html++ <video width="560" height="315" controls>+ <source src="_static/AnimationGrowFromCenter.mp4" type="video/mp4">+ </video>++.. code-block:: pythonclass AnimationGrowFromCenter(Scene):def construct(self):@@ -145,16 +189,22 @@ GrowFromCenter :download:`assets/AnimationGrowFromCenter.mp4`::Diagonal Directions--------------------You can combine cardinal directions to form diagonal animations :download:`assets/AnimationFadeInFromDiagnal.mp4`::+You can combine cardinal directions to form diagonal animations++.. raw:: html- class AnimationFadeInFromDiagnal(Scene):+ <video width="560" height="315" controls>+ <source src="_static/AnimationFadeInFromDiagonal.mp4" type="video/mp4">+ </video>++.. code-block:: python++ class AnimationFadeInFromDiagonal(Scene):def construct(self):square = Square()for diag in [UP + LEFT, UP + RIGHT, DOWN + LEFT, DOWN + RIGHT]:self.play(FadeInFrom(square, diag))--.. note::You can also use the abbreviated forms like ``UL, UR, DL, DR``.See :ref:`ref-directions`.diff --git a/docs/source/assets/SquareToCircle.mp4 b/docs/source/assets/SquareToCircle.mp4new file mode 100644index 000000000..5b1e9b902Binary files /dev/null and b/docs/source/assets/SquareToCircle.mp4 differdiff --git a/docs/source/conf.py b/docs/source/conf.pyindex 54a91b6ce..815677167 100644--- a/docs/source/conf.py+++ b/docs/source/conf.py@@ -50,4 +50,4 @@ html_theme = 'sphinx_rtd_theme'# Add any paths that contain custom static files (such as style sheets) here,# relative to this directory. They are copied after the builtin static files,# so a file named "default.css" will overwrite the builtin "default.css".-html_static_path = ['_static']+html_static_path = ['assets']diff --git a/docs/source/getting_started/learning_by_example.rst b/docs/source/getting_started/learning_by_example.rstindex 5ad19693c..96de24dd7 100644--- a/docs/source/getting_started/learning_by_example.rst+++ b/docs/source/getting_started/learning_by_example.rst@@ -64,7 +64,9 @@ and automatically play it... raw:: html- <iframe width="560" height="315" src="https://www.youtube.com/embed/8tvYDIGLJJA?ecver=1" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>+ <video width="560" height="315" controls>+ <source src="../_static/SquareToCircle.mp4" type="video/mp4">+ </video>Let's step through each line of the :class:`~scene.scene.Scene`. Lines 3 and 4instantiate a :class:`~mobject.geometry.Circle` and