mirror of
https://github.com/3b1b/manim.git
synced 2025-04-13 09:47:07 +00:00
Use quick_point_from_proportion in MoveAlongPath
This commit is contained in:
parent
d8428585f8
commit
576a26493e
1 changed files with 3 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue