mirror of
https://github.com/3b1b/manim.git
synced 2025-08-02 19:46:21 +08:00
Don't use 'become' for interpolate at alpha = 0 or 1
This commit is contained in:
@ -121,10 +121,6 @@ class Transform(Animation):
|
||||
target_copy: Mobject,
|
||||
alpha: float
|
||||
):
|
||||
if alpha == 0:
|
||||
submob.become(start)
|
||||
elif alpha == 1:
|
||||
submob.become(target_copy)
|
||||
submob.interpolate(start, target_copy, alpha, self.path_func)
|
||||
return self
|
||||
|
||||
|
@ -1719,6 +1719,12 @@ class Mobject(object):
|
||||
keys = [k for k in self.data.dtype.names if k not in self.locked_data_keys]
|
||||
if keys:
|
||||
self.note_changed_data()
|
||||
if alpha == 0:
|
||||
self.data[:] = mobject1.data[:]
|
||||
keys = []
|
||||
elif alpha == 1:
|
||||
self.data[:] = mobject2.data[:]
|
||||
keys = []
|
||||
for key in keys:
|
||||
func = path_func if key in self.pointlike_data_keys else interpolate
|
||||
md1 = mobject1.data[key]
|
||||
|
Reference in New Issue
Block a user