mirror of
https://github.com/3b1b/manim.git
synced 2025-07-30 13:34:19 +08:00
Randolph and Mortimer
This commit is contained in:
@ -112,27 +112,27 @@ class Animation(object):
|
||||
|
||||
|
||||
#Fuck this is cool!
|
||||
class TransformAnimations(Transform):
|
||||
def __init__(self, start_anim, end_anim,
|
||||
alpha_func = squish_alpha_func(high_inflection_0_to_1),
|
||||
**kwargs):
|
||||
self.start_anim, self.end_anim = start_anim, end_anim
|
||||
Transform.__init__(
|
||||
self,
|
||||
start_anim.mobject,
|
||||
end_anim.mobject,
|
||||
run_time = max(start_anim.run_time, end_anim.run_time),
|
||||
alpha_func = alpha_func,
|
||||
**kwargs
|
||||
)
|
||||
#Rewire starting and ending mobjects
|
||||
start_anim.mobject = self.starting_mobject
|
||||
end_anim.mobject = self.ending_mobject
|
||||
# class TransformAnimations(Transform):
|
||||
# def __init__(self, start_anim, end_anim,
|
||||
# alpha_func = squish_alpha_func(high_inflection_0_to_1),
|
||||
# **kwargs):
|
||||
# self.start_anim, self.end_anim = start_anim, end_anim
|
||||
# Transform.__init__(
|
||||
# self,
|
||||
# start_anim.mobject,
|
||||
# end_anim.mobject,
|
||||
# run_time = max(start_anim.run_time, end_anim.run_time),
|
||||
# alpha_func = alpha_func,
|
||||
# **kwargs
|
||||
# )
|
||||
# #Rewire starting and ending mobjects
|
||||
# start_anim.mobject = self.starting_mobject
|
||||
# end_anim.mobject = self.ending_mobject
|
||||
|
||||
def update(self, alpha):
|
||||
self.start_anim.update(alpha)
|
||||
self.end_anim.update(alpha)
|
||||
Transform.update(self, alpha)
|
||||
# def update(self, alpha):
|
||||
# self.start_anim.update(alpha)
|
||||
# self.end_anim.update(alpha)
|
||||
# Transform.update(self, alpha)
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user