diff --git a/README.md b/README.md index 8180666..6c01190 100644 --- a/README.md +++ b/README.md @@ -51,14 +51,7 @@ pip install manim-slides ### Install From Repository -An alternative way to install Manim Slides is to clone the git repository, and install from there: - -```bash -git clone https://github.com/jeertmans/manim-slides -pip install -e . -``` - -> *Note:* the `-e` flag allows you to edit the files, and observe the changes directly when using Manim Slides +An alternative way to install Manim Slides is to clone the git repository, and install from there: read the [contributing guide](https://eertmans.be/manim-slides/contributing/workflow.html) to know how. @@ -97,14 +90,8 @@ class BasicExample(Slide): self.play(dot.animate.move_to(ORIGIN)) self.pause() # Waits user to press continue to go to the next slide - - # Each slide MUST end with an animation - # -> self.wait is considered an animation with Manim, not ManimGL - self.play(dot.animate.move_to(LEFT)) ``` -You **must** end your `Slide` with a `self.play(...)` or a `self.wait(...)`. - First, render the animation files: ```bash diff --git a/example.py b/example.py index 3d4b14d..bf11902 100644 --- a/example.py +++ b/example.py @@ -31,10 +31,6 @@ class BasicExample(Slide): self.play(dot.animate.move_to(ORIGIN)) self.pause() # Waits user to press continue to go to the next slide - # Each slide MUST end with an animation - # -> self.wait is considered an animation with Manim, not ManimGL - self.play(dot.animate.move_to(LEFT)) - class ConvertExample(Slide): """WARNING: this example does not seem to work with ManimGL.""" diff --git a/manim_slides/slide.py b/manim_slides/slide.py index a41d182..598789e 100644 --- a/manim_slides/slide.py +++ b/manim_slides/slide.py @@ -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,