Skip to content

Commit 4787b4e

Browse files
committed
fix: add wait after subsections to show completed animation
Manim has a bug where animations stop at ~93% completion. When videos pause after a subsection, they show this incomplete last frame (e.g., circles with visible gaps). Solution: Call self.wait() after each subsection, same as next_slide() does. This adds frames showing the completed animation state. The wait() creates a separate animation file that shows the final completed state, ensuring when video playback pauses, it shows the complete animation instead of the 93% incomplete frame. Reference: https://lightrun.com/answers/manimcommunity-manim-t-values-issue-that-causes-the-animations-to-not-be-finished-entirely
1 parent 0eab92a commit 4787b4e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

manim_slides/slide/base.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,11 @@ def construct(self):
333333
if relative_animation_index < 0:
334334
relative_animation_index = 0
335335

336+
# Add wait to show completed animation state (workaround for Manim bug where
337+
# animations stop at ~93% completion). Same as next_slide() behavior.
338+
if self.wait_time_between_slides > 0.0:
339+
self.wait(self.wait_time_between_slides) # type: ignore[attr-defined]
340+
336341
marker = SubsectionMarker(
337342
animation_index=relative_animation_index,
338343
name=name,

0 commit comments

Comments
 (0)