mirror of
https://github.com/jeertmans/manim-slides.git
synced 2025-05-21 12:37:00 +08:00
feat(lib): remove constraint on last animation and update readme (#117)
This removes the constraint that required a Slide class to end with a animation. This was actually not needed, and could lead to confusion since `self.wait` is not an animation with ManimGL, but well with Manim. This fix, however, still means that a calls to `self.wait` with ManimGL, after last `self.pause` call, will be ignored.
This commit is contained in:
@ -105,6 +105,11 @@ class Slide(Scene): # type:ignore
|
||||
|
||||
def add_last_slide(self) -> None:
|
||||
"""Adds a 'last' slide to the end of slides."""
|
||||
|
||||
if self.current_animation == self.slides[-1].end_animation:
|
||||
self.slides[-1].type = SlideType.last
|
||||
return
|
||||
|
||||
self.slides.append(
|
||||
SlideConfig(
|
||||
type=SlideType.last,
|
||||
|
Reference in New Issue
Block a user