mirror of
https://github.com/3b1b/manim.git
synced 2025-04-13 09:47:07 +00:00
Use become for interpolating at 0 or 1
This commit is contained in:
parent
3c8e3792e7
commit
f96a697ee3
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue