mirror of
https://github.com/3b1b/manim.git
synced 2025-07-31 22:13:30 +08:00
Fixed Succession bug which had resulted in incompletely drawn subanimations
This commit is contained in:
@ -452,11 +452,18 @@ class Succession(Animation):
|
|||||||
self.mobject.add(m)
|
self.mobject.add(m)
|
||||||
self.mobject.add(self.animations[index].mobject)
|
self.mobject.add(self.animations[index].mobject)
|
||||||
|
|
||||||
|
for i in range(index):
|
||||||
|
self.animations[i].update(1)
|
||||||
|
|
||||||
self.current_anim_index = index
|
self.current_anim_index = index
|
||||||
self.current_alpha = self.critical_alphas[index]
|
self.current_alpha = self.critical_alphas[index]
|
||||||
|
|
||||||
def update_mobject(self, alpha):
|
def update_mobject(self, alpha):
|
||||||
|
if alpha == self.current_alpha:
|
||||||
|
return
|
||||||
|
|
||||||
if self.num_anims == 0:
|
if self.num_anims == 0:
|
||||||
|
self.current_alpha = alpha
|
||||||
return
|
return
|
||||||
|
|
||||||
i = 0
|
i = 0
|
||||||
@ -474,6 +481,7 @@ class Succession(Animation):
|
|||||||
alpha
|
alpha
|
||||||
)
|
)
|
||||||
self.animations[i].update(sub_alpha)
|
self.animations[i].update(sub_alpha)
|
||||||
|
self.current_alpha = alpha
|
||||||
|
|
||||||
def clean_up(self, *args, **kwargs):
|
def clean_up(self, *args, **kwargs):
|
||||||
# We clean up as though we've played ALL animations, even if
|
# We clean up as though we've played ALL animations, even if
|
||||||
@ -514,3 +522,4 @@ class EmptyAnimation(Animation):
|
|||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
return Animation.__init__(self, Group(), *args, **kwargs)
|
return Animation.__init__(self, Group(), *args, **kwargs)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user