mirror of
https://github.com/3b1b/manim.git
synced 2025-08-20 05:14:12 +00:00
Bug fix on CycleAnimation
This commit is contained in:
parent
62edfbb32f
commit
a0fc3ce324
1 changed files with 4 additions and 2 deletions
|
@ -128,12 +128,14 @@ class NormalAnimationAsContinualAnimation(ContinualAnimation):
|
|||
)
|
||||
|
||||
class CycleAnimation(ContinualAnimation):
|
||||
def __init__(self, *animation, **kwargs):
|
||||
def __init__(self, animation, **kwargs):
|
||||
self.animation = animation
|
||||
ContinualAnimation.__init__(self, animation.mobject, **kwargs)
|
||||
|
||||
def update_mobject(self, dt):
|
||||
sef.animation.update(self.internal_time % self.animation.run_time)
|
||||
mod_value = self.internal_time % self.animation.run_time
|
||||
alpha = mod_value/float(self.animation.run_time)
|
||||
self.animation.update(alpha)
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue