fix documentation links

This commit is contained in:
Devin Neal
2019-06-06 20:40:11 -07:00
parent de0d7c907d
commit 57b96fdd07
4 changed files with 66 additions and 14 deletions

View File

@ -16,7 +16,13 @@ Animation are used in conjunction with ``scene.Play``
Fade 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:: python
class AnimationFadeIn(Scene): class AnimationFadeIn(Scene):
def construct(self): def construct(self):
@ -27,9 +33,13 @@ FadeIn :download:`/assets/AnimationFadeIn.mp4`::
self.add(anno) self.add(anno)
self.play(FadeIn(square)) 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:: python
class AnimationFadeOut(Scene): class AnimationFadeOut(Scene):
def construct(self): 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:: python
class AnimationFadeInFrom(Scene): class AnimationFadeInFrom(Scene):
def construct(self): 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:: python
class AnimationFadeOutAndShift(Scene): class AnimationFadeOutAndShift(Scene):
def construct(self): 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:: python
class AnimationFadeInFromLarge(Scene): class AnimationFadeInFromLarge(Scene):
def construct(self): def construct(self):
@ -91,9 +119,13 @@ FadeInFromLarge :download:`assets/AnimationFadeInFromLarge.mp4`::
self.play(FadeInFromLarge(square, scale_factor=factor)) self.play(FadeInFromLarge(square, scale_factor=factor))
self.remove(anno, square) 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:: python
class AnimationFadeInFromPoint(Scene): class AnimationFadeInFromPoint(Scene):
def construct(self): def construct(self):
@ -110,7 +142,13 @@ FadeInFromPoint :download:`assets/AnimationFadeInFromPoint.mp4`::
Grow 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:: python
class AnimationGrowFromEdge(Scene): class AnimationGrowFromEdge(Scene):
def construct(self): 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:: python
class AnimationGrowFromCenter(Scene): class AnimationGrowFromCenter(Scene):
def construct(self): def construct(self):
@ -145,16 +189,22 @@ GrowFromCenter :download:`assets/AnimationGrowFromCenter.mp4`::
Diagonal Directions Diagonal Directions
------------------- -------------------
You can combine cardinal directions to form diagonal animations :download:`assets/AnimationFadeInFromDiagnal.mp4`:: You can combine cardinal directions to form diagonal animations
class AnimationFadeInFromDiagnal(Scene): .. raw:: html
<video width="560" height="315" controls>
<source src="_static/AnimationFadeInFromDiagonal.mp4" type="video/mp4">
</video>
.. code-block:: python
class AnimationFadeInFromDiagonal(Scene):
def construct(self): def construct(self):
square = Square() square = Square()
for diag in [UP + LEFT, UP + RIGHT, DOWN + LEFT, DOWN + RIGHT]: for diag in [UP + LEFT, UP + RIGHT, DOWN + LEFT, DOWN + RIGHT]:
self.play(FadeInFrom(square, diag)) self.play(FadeInFrom(square, diag))
.. note:: .. note::
You can also use the abbreviated forms like ``UL, UR, DL, DR``. You can also use the abbreviated forms like ``UL, UR, DL, DR``.
See :ref:`ref-directions`. See :ref:`ref-directions`.

Binary file not shown.

View File

@ -50,4 +50,4 @@ html_theme = 'sphinx_rtd_theme'
# Add any paths that contain custom static files (such as style sheets) here, # 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, # relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css". # so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static'] html_static_path = ['assets']

View File

@ -64,7 +64,9 @@ and automatically play it.
.. raw:: html .. 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 4 Let's step through each line of the :class:`~scene.scene.Scene`. Lines 3 and 4
instantiate a :class:`~mobject.geometry.Circle` and instantiate a :class:`~mobject.geometry.Circle` and