Randolph and Mortimer

This commit is contained in:
Grant Sanderson
2015-06-13 19:00:23 -07:00
parent e47f240840
commit 344290068c
18 changed files with 414 additions and 279 deletions

View File

@ -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)