mirror of
https://github.com/3b1b/manim.git
synced 2025-11-14 10:37:45 +00:00
Bug fix to Succession; it wasn't initializing runtimes
This commit is contained in:
parent
67a33d2e88
commit
9180a687f9
1 changed files with 8 additions and 4 deletions
|
|
@ -21,10 +21,13 @@ class AnimationGroup(Animation):
|
|||
# If >0 and <1, they start at lagged times
|
||||
# from one and other.
|
||||
"lag_ratio": 0,
|
||||
"group": None,
|
||||
}
|
||||
|
||||
def __init__(self, *animations, **kwargs):
|
||||
digest_config(self, kwargs)
|
||||
self.animations = animations
|
||||
if self.group is None:
|
||||
self.group = Group(*remove_list_redundancies(
|
||||
[anim.mobject for anim in animations]
|
||||
))
|
||||
|
|
@ -34,9 +37,9 @@ class AnimationGroup(Animation):
|
|||
return self.group
|
||||
|
||||
def begin(self):
|
||||
self.init_run_time()
|
||||
for anim in self.animations:
|
||||
anim.begin()
|
||||
self.init_run_time()
|
||||
|
||||
def finish(self):
|
||||
for anim in self.animations:
|
||||
|
|
@ -106,6 +109,7 @@ class Succession(AnimationGroup):
|
|||
|
||||
def begin(self):
|
||||
assert(len(self.animations) > 0)
|
||||
self.init_run_time()
|
||||
self.active_animation = self.animations[0]
|
||||
self.active_animation.begin()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue