From 576a26493e5c4d6e5a198630b37c5ad3eb11464c Mon Sep 17 00:00:00 2001 From: Grant Sanderson Date: Wed, 15 Feb 2023 20:54:59 -0800 Subject: [PATCH] Use quick_point_from_proportion in MoveAlongPath --- manimlib/animation/movement.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/manimlib/animation/movement.py b/manimlib/animation/movement.py index e5671df2..410c15c3 100644 --- a/manimlib/animation/movement.py +++ b/manimlib/animation/movement.py @@ -11,6 +11,7 @@ if TYPE_CHECKING: import numpy as np from manimlib.mobject.mobject import Mobject + from manimlib.mobject.types.vectorized_mobject import VMobject class Homotopy(Animation): @@ -105,7 +106,7 @@ class MoveAlongPath(Animation): def __init__( self, mobject: Mobject, - path: Mobject, + path: VMobject, suspend_mobject_updating: bool = False, **kwargs ): @@ -113,5 +114,5 @@ class MoveAlongPath(Animation): super().__init__(mobject, suspend_mobject_updating=suspend_mobject_updating, **kwargs) def interpolate_mobject(self, alpha: float) -> None: - point = self.path.point_from_proportion(alpha) + point = self.path.quick_point_from_proportion(alpha) self.mobject.move_to(point)