Files
Jérome Eertmans 205972125c chore(docs): improving the docs a bit more (#116)
* chore(docs): improving the docs a bit more

This adds some useful extensions, links, and add. information.

* fix(deps): update lockfiles no-cache
2023-01-31 10:29:21 +01:00

2.1 KiB

Examples

Contents of example.py.

Do not forget to import Manim Slides and Manim or ManimGL:

from manim import *
from manim_slides import Slide, ThreeDSlide

or

from manimlib import *
from manim_slides import Slide, ThreeDSlide

Then, each presentation, named SCENE, was generated with those two commands:

manim example.py SCENE # or manimgl example SCENE
manim-slides convert SCENE -ccontrols=true

where -ccontrols=true indicates that we want to display the blue navigation arrows.

Basic Example

Basic example from quickstart.

.. literalinclude:: ../../../example.py
   :language: python
   :linenos:
   :pyobject: BasicExample

3D Example

Example using 3D camera. As Manim and ManimGL handle 3D differently, definitions are slightly different.

With Manim

.. literalinclude:: ../../../example.py
   :language: python
   :linenos:
   :dedent: 4
   :start-after: [manim-3d]
   :end-before: [manim-3d]

With ManimGL

.. literalinclude:: ../../../example.py
   :language: python
   :linenos:
   :dedent: 4
   :start-after: [manimgl-3d]
   :end-before: [manimgl-3d]

Advanced Example

A more advanced example is ConvertExample, which is used as demo slide and tutorial.

.. literalinclude:: ../../../example.py
   :language: python
   :linenos:
   :pyobject: ConvertExample