Use become for interpolating at 0 or 1

This commit is contained in:
Grant Sanderson 2023-01-25 19:21:24 -08:00
parent 3c8e3792e7
commit f96a697ee3

View file

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