diff --git a/manim/animation/indication.py b/manim/animation/indication.py index db2640d5a5..01a0e619a5 100644 --- a/manim/animation/indication.py +++ b/manim/animation/indication.py @@ -31,7 +31,6 @@ def construct(self): "Flash", "ShowPassingFlash", "ShowPassingFlashWithThinningStrokeWidth", - "ShowCreationThenFadeOut", "ApplyWave", "Circumscribe", "Wiggle", @@ -342,16 +341,6 @@ def __init__(self, vmobject, n_segments=10, time_width=0.1, remover=True, **kwar ) -@deprecated( - since="v0.15.0", - until="v0.16.0", - message="Use Create then FadeOut to achieve this effect.", -) -class ShowCreationThenFadeOut(Succession): - def __init__(self, mobject: Mobject, remover: bool = True, **kwargs) -> None: - super().__init__(Create(mobject), FadeOut(mobject), remover=remover, **kwargs) - - class ApplyWave(Homotopy): """Send a wave through the Mobject distorting it temporarily. diff --git a/manim/utils/paths.py b/manim/utils/paths.py index 9d7ec10d73..4cf867b428 100644 --- a/manim/utils/paths.py +++ b/manim/utils/paths.py @@ -10,28 +10,22 @@ ] -from typing import Callable +from typing import TYPE_CHECKING import numpy as np from ..constants import OUT from ..utils.bezier import interpolate -from ..utils.deprecation import deprecated_params from ..utils.space_ops import rotation_matrix -STRAIGHT_PATH_THRESHOLD = 0.01 +if TYPE_CHECKING: + from manim.typing import PathFuncType, Vector3D + -PATH_FUNC_TYPE = Callable[[np.ndarray, np.ndarray, float], np.ndarray] +STRAIGHT_PATH_THRESHOLD = 0.01 -# Remove `*args` and the `if` inside the functions when removing deprecation -@deprecated_params( - params="start_points, end_points, alpha", - since="v0.14", - until="v0.15", - message="Straight path is now returning interpolating function to make it consistent with other path functions. Use straight_path()(a,b,c) instead of straight_path(a,b,c).", -) -def straight_path(*args) -> PATH_FUNC_TYPE: +def straight_path(): """Simplest path function. Each point in a set goes in a straight path toward its destination. Examples @@ -74,14 +68,12 @@ def construct(self): self.wait() """ - if len(args) > 0: - return interpolate(*args) return interpolate def path_along_circles( - arc_angle: float, circles_centers: np.ndarray, axis: np.ndarray = OUT -) -> PATH_FUNC_TYPE: + arc_angle: float, circles_centers: np.ndarray, axis: Vector3D = OUT +) -> PathFuncType: """This function transforms each point by moving it roughly along a circle, each with its own specified center. The path may be seen as each point smoothly changing its orbit from its starting position to its destination. @@ -158,7 +150,7 @@ def path(start_points: np.ndarray, end_points: np.ndarray, alpha: float): return path -def path_along_arc(arc_angle: float, axis: np.ndarray = OUT) -> PATH_FUNC_TYPE: +def path_along_arc(arc_angle: float, axis: Vector3D = OUT) -> PathFuncType: """This function transforms each point by moving it along a circular arc. Parameters @@ -225,7 +217,7 @@ def path(start_points: np.ndarray, end_points: np.ndarray, alpha: float): return path -def clockwise_path() -> PATH_FUNC_TYPE: +def clockwise_path() -> PathFuncType: """This function transforms each point by moving clockwise around a half circle. Examples @@ -271,7 +263,7 @@ def construct(self): return path_along_arc(-np.pi) -def counterclockwise_path() -> PATH_FUNC_TYPE: +def counterclockwise_path() -> PathFuncType: """This function transforms each point by moving counterclockwise around a half circle. Examples @@ -317,7 +309,7 @@ def construct(self): return path_along_arc(np.pi) -def spiral_path(angle: float, axis: np.ndarray = OUT) -> PATH_FUNC_TYPE: +def spiral_path(angle: float, axis: Vector3D = OUT) -> PathFuncType: """This function transforms each point by moving along a spiral to its destination. Parameters diff --git a/tests/test_graphical_units/control_data/indication/ShowCreationThenFadeOut.npz b/tests/test_graphical_units/control_data/indication/ShowCreationThenFadeOut.npz deleted file mode 100644 index ecd0ebf1b4..0000000000 Binary files a/tests/test_graphical_units/control_data/indication/ShowCreationThenFadeOut.npz and /dev/null differ diff --git a/tests/test_graphical_units/test_indication.py b/tests/test_graphical_units/test_indication.py index 47db2e49a7..592cf5fb38 100644 --- a/tests/test_graphical_units/test_indication.py +++ b/tests/test_graphical_units/test_indication.py @@ -42,13 +42,6 @@ def test_ShowPassingFlash(scene): scene.play(ShowPassingFlash(square.copy())) -@frames_comparison(last_frame=False) -def test_ShowCreationThenFadeOut(scene): - square = Square() - scene.add(square) - scene.play(ShowCreationThenFadeOut(square.copy())) - - @frames_comparison(last_frame=False) def test_ApplyWave(scene): square = Square()