mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 22:03:01 +08:00
Added CycleAnimation (which turns Animations into ContinualAnimations through unending repetition)
This commit is contained in:
@ -127,7 +127,13 @@ class NormalAnimationAsContinualAnimation(ContinualAnimation):
|
||||
min(float(self.internal_time)/self.animation.run_time, 1)
|
||||
)
|
||||
|
||||
|
||||
class CycleAnimation(ContinualAnimation):
|
||||
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)
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user