mirror of
https://github.com/3b1b/manim.git
synced 2025-09-01 00:48:45 +00:00
Experimenting with applying rate_func at the submobject level. Admittedly, I haven't thought it through that much, but I suspect this will make things work better
This commit is contained in:
parent
573abe82b8
commit
e567fff855
1 changed files with 6 additions and 2 deletions
|
@ -108,7 +108,8 @@ class Animation(object):
|
|||
# Methods for interpolation, the mean of an Animation
|
||||
def interpolate(self, alpha):
|
||||
alpha = np.clip(alpha, 0, 1)
|
||||
self.interpolate_mobject(self.rate_func(alpha))
|
||||
# self.interpolate_mobject(self.rate_func(alpha))
|
||||
self.interpolate_mobject(alpha) # TODO, check
|
||||
|
||||
def update(self, alpha):
|
||||
"""
|
||||
|
@ -121,7 +122,10 @@ class Animation(object):
|
|||
families = list(self.get_all_families_zipped())
|
||||
for i, mobs in enumerate(families):
|
||||
sub_alpha = self.get_sub_alpha(alpha, i, len(families))
|
||||
self.interpolate_submobject(*mobs, sub_alpha)
|
||||
self.interpolate_submobject(
|
||||
*mobs,
|
||||
self.rate_func(sub_alpha) # TODO, check
|
||||
)
|
||||
|
||||
def interpolate_submobject(self, submobject, starting_sumobject, alpha):
|
||||
# Typically ipmlemented by subclass
|
||||
|
|
Loading…
Add table
Reference in a new issue