galatolofederico / manim-presentation

Tool for live presentations using manim
GNU General Public License v3.0
162 stars 18 forks source link

Animations between loops don't show without pauses #14

Closed jacquesrabie closed 2 years ago

jacquesrabie commented 3 years ago

Take for example the following, where I commented out self.pause() between the two loops:

from manim import *
from manim_presentation 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.play(dot.animate.move_to(RIGHT*3))
        #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))

When I run through the presentation, it skips past the animation of the dot moving to and from the origin and continues to the next loop. The video files for these animations are still in \manim-presentation\presentation\files but the presentation skips from Animation: 1 to Animation: 4.

galatolofederico commented 3 years ago

That is weird. Tomorrow i will take a look at it. In the meantime maybe @glatteis can help you