mirror of
https://github.com/3b1b/manim.git
synced 2025-04-13 09:47:07 +00:00
Change where Animation.begin is invoked
This commit is contained in:
parent
9f76063271
commit
1aaef5aba9
1 changed files with 2 additions and 2 deletions
|
@ -460,14 +460,14 @@ class Scene(Container):
|
||||||
def begin_animations(self, animations):
|
def begin_animations(self, animations):
|
||||||
curr_mobjects = self.get_mobject_family_members()
|
curr_mobjects = self.get_mobject_family_members()
|
||||||
for animation in animations:
|
for animation in animations:
|
||||||
|
# Begin animation
|
||||||
|
animation.begin()
|
||||||
# Anything animated that's not already in the
|
# Anything animated that's not already in the
|
||||||
# scene gets added to the scene
|
# scene gets added to the scene
|
||||||
mob = animation.mobject
|
mob = animation.mobject
|
||||||
if mob not in curr_mobjects:
|
if mob not in curr_mobjects:
|
||||||
self.add(mob)
|
self.add(mob)
|
||||||
curr_mobjects += mob.get_family()
|
curr_mobjects += mob.get_family()
|
||||||
# Begin animation
|
|
||||||
animation.begin()
|
|
||||||
|
|
||||||
def progress_through_animations(self, animations):
|
def progress_through_animations(self, animations):
|
||||||
# Paint all non-moving objects onto the screen, so they don't
|
# Paint all non-moving objects onto the screen, so they don't
|
||||||
|
|
Loading…
Add table
Reference in a new issue