Skip to content

How ot use multiple Classes/Scenes to structure Code? #547

Answered by jeertmans
amstrdm asked this question in Q&A

You must be logged in to vote

Hi @amstrdm, good question!

This is actually a common question people have with Manim itself.

If you don't mind having distinct classes for different parts of your video, you can always:

manim-slides render file.py ClassA ClassB ClassC...
# Then
manim-slides present ClassA ClassB ClassC...
# Or, e.g.
manim-slides convert ClassA ClassB ClassC... out.html

As long as all classes have the same width and height, this should work just fine (Manim Slides will automatically concatenate the scenes in one of the two last commands).

If you need to share some information between all slides (like a slide number that increases for each slide), then I recommend splitting your code into multiple methods,…

Replies: 2 comments 1 reply

You must be logged in to vote
0 replies
Answer selected by jeertmans

You must be logged in to vote
1 reply
@jeertmans

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
2 participants