Quickstart

If not already, install Manim Slides, along with either Manim or ManimGL, see installation.

Creating your first slides

Using Manim Slides is a two-step process:

  1. Render animations using Slide (resp. ThreeDSlide) as a base class instead of Scene (resp. ThreeDScene), and add calls to self.next_slide() every time you want to create a new slide.

  2. Run manim-slides on rendered animations and display them like a PowerPoint presentation.

The documentation is available online.

Basic Example

Call self.next_slide() every time you want to create a pause between animations, and self.next_slide(loop=True) if you want the next slide to loop over animations until the user presses continue:

from manim import *  # or: from manimlib import *

from manim_slides import Slide


class BasicExample(Slide):
    def construct(self):
        circle = Circle(radius=3, color=BLUE)
        dot = Dot()

        self.play(GrowFromCenter(circle))
        self.next_slide()  # Waits user to press continue to go to the next slide

        self.next_slide(loop=True)  # Start loop
        self.play(MoveAlongPath(dot, circle), run_time=2, rate_func=linear)
        self.next_slide()  # This will start a new non-looping slide

        self.play(dot.animate.move_to(ORIGIN))

First, render the animation files:

manim-slides render example.py BasicExample
# or use ManimGL
manim-slides render --GL example.py BasicExample

Note

Using manim-slides render makes sure to use the manim (or manimlib) library that was installed in the same Python environment. Put simply, this is a wrapper around manim render [ARGS]... (or manimgl [ARGS]...).

To start the presentation using Scene1, Scene2 and so on, run:

manim-slides [OPTIONS] Scene1 Scene2...

In our example:

manim-slides BasicExample

The output slides should look this this:

For more advanced examples, see the Examples section.