NOTE: This project is a fork of
manim-presentation. Since the project seemed to be inactive, I decided to create my own fork to deploy new features more rapidly.
pip install manim-slides
Use the class
Slide as your scenes base class:
from manim_slides import Slide class Example(Slide): def construct(self): ...
self.pause() when you want to pause the playback and wait for an input to continue (check the keybindings).
Wrap a series of animations between
self.stop_loop() when you want to loop them (until input to continue):
from manim import * from manim_slides import Slide class Example(Slide): def construct(self): circle = Circle(radius=3, color=BLUE) dot = Dot() self.play(GrowFromCenter(circle)) self.pause() self.start_loop() self.play(MoveAlongPath(dot, circle), run_time=2, rate_func=linear) self.end_loop() self.play(dot.animate.move_to(ORIGIN)) self.pause() self.wait()
You must end your
Slide with a
self.play(...) or a
To start the presentation using
Scene2 and so on simply run:
manim-slides Scene1 Scene2...
Default keybindings to control the presentation:
|Right Arrow||Continue/Next Slide|
|Left Arrow||Previous Slide|
|R||Re-Animate Current Slide|
You can run the configuration wizard with:
Alternatively you can specify different keybindings creating a file named
.manim-slides.json with the keys:
A default file can be created with:
cv2.waitKeyEx()to wait for keypresses, and directly registers the key code.
Clone this repository:
git clone https://github.com/jeertmans/manim-slides.git cd manim-slides
pip install manim manim-slides
Render the example scene:
manim -qh example.py
Run the presentation
Below is a small recording of me playing with the slides back and forth.
Here are a few things that I implemented (or that I'm planning to implement) on top of the original work:
The code is released as Free Software under the GNU/GPLv3 license. Copying, adapting and republishing it is not only consent but also encouraged.