mirror of
https://github.com/3b1b/manim.git
synced 2025-08-02 19:46:21 +08:00
Use become for interpolating at 0 or 1
This commit is contained in:
@ -121,6 +121,10 @@ 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
|
||||
|
||||
|
Reference in New Issue
Block a user