Skip to content

Commit 294313d

Browse files
Remove deprecated parameters and animations (#3688)
* Remove deprecated parameters/animations * Remove test * Remove test data
1 parent a6da37b commit 294313d

File tree

4 files changed

+12
-38
lines changed

4 files changed

+12
-38
lines changed

manim/animation/indication.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ def construct(self):
3131
"Flash",
3232
"ShowPassingFlash",
3333
"ShowPassingFlashWithThinningStrokeWidth",
34-
"ShowCreationThenFadeOut",
3534
"ApplyWave",
3635
"Circumscribe",
3736
"Wiggle",
@@ -342,16 +341,6 @@ def __init__(self, vmobject, n_segments=10, time_width=0.1, remover=True, **kwar
342341
)
343342

344343

345-
@deprecated(
346-
since="v0.15.0",
347-
until="v0.16.0",
348-
message="Use Create then FadeOut to achieve this effect.",
349-
)
350-
class ShowCreationThenFadeOut(Succession):
351-
def __init__(self, mobject: Mobject, remover: bool = True, **kwargs) -> None:
352-
super().__init__(Create(mobject), FadeOut(mobject), remover=remover, **kwargs)
353-
354-
355344
class ApplyWave(Homotopy):
356345
"""Send a wave through the Mobject distorting it temporarily.
357346

manim/utils/paths.py

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,22 @@
1010
]
1111

1212

13-
from typing import Callable
13+
from typing import TYPE_CHECKING
1414

1515
import numpy as np
1616

1717
from ..constants import OUT
1818
from ..utils.bezier import interpolate
19-
from ..utils.deprecation import deprecated_params
2019
from ..utils.space_ops import rotation_matrix
2120

22-
STRAIGHT_PATH_THRESHOLD = 0.01
21+
if TYPE_CHECKING:
22+
from manim.typing import PathFuncType, Vector3D
23+
2324

24-
PATH_FUNC_TYPE = Callable[[np.ndarray, np.ndarray, float], np.ndarray]
25+
STRAIGHT_PATH_THRESHOLD = 0.01
2526

2627

27-
# Remove `*args` and the `if` inside the functions when removing deprecation
28-
@deprecated_params(
29-
params="start_points, end_points, alpha",
30-
since="v0.14",
31-
until="v0.15",
32-
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).",
33-
)
34-
def straight_path(*args) -> PATH_FUNC_TYPE:
28+
def straight_path():
3529
"""Simplest path function. Each point in a set goes in a straight path toward its destination.
3630
3731
Examples
@@ -74,14 +68,12 @@ def construct(self):
7468
self.wait()
7569
7670
"""
77-
if len(args) > 0:
78-
return interpolate(*args)
7971
return interpolate
8072

8173

8274
def path_along_circles(
83-
arc_angle: float, circles_centers: np.ndarray, axis: np.ndarray = OUT
84-
) -> PATH_FUNC_TYPE:
75+
arc_angle: float, circles_centers: np.ndarray, axis: Vector3D = OUT
76+
) -> PathFuncType:
8577
"""This function transforms each point by moving it roughly along a circle, each with its own specified center.
8678
8779
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):
158150
return path
159151

160152

161-
def path_along_arc(arc_angle: float, axis: np.ndarray = OUT) -> PATH_FUNC_TYPE:
153+
def path_along_arc(arc_angle: float, axis: Vector3D = OUT) -> PathFuncType:
162154
"""This function transforms each point by moving it along a circular arc.
163155
164156
Parameters
@@ -225,7 +217,7 @@ def path(start_points: np.ndarray, end_points: np.ndarray, alpha: float):
225217
return path
226218

227219

228-
def clockwise_path() -> PATH_FUNC_TYPE:
220+
def clockwise_path() -> PathFuncType:
229221
"""This function transforms each point by moving clockwise around a half circle.
230222
231223
Examples
@@ -271,7 +263,7 @@ def construct(self):
271263
return path_along_arc(-np.pi)
272264

273265

274-
def counterclockwise_path() -> PATH_FUNC_TYPE:
266+
def counterclockwise_path() -> PathFuncType:
275267
"""This function transforms each point by moving counterclockwise around a half circle.
276268
277269
Examples
@@ -317,7 +309,7 @@ def construct(self):
317309
return path_along_arc(np.pi)
318310

319311

320-
def spiral_path(angle: float, axis: np.ndarray = OUT) -> PATH_FUNC_TYPE:
312+
def spiral_path(angle: float, axis: Vector3D = OUT) -> PathFuncType:
321313
"""This function transforms each point by moving along a spiral to its destination.
322314
323315
Parameters
Binary file not shown.

tests/test_graphical_units/test_indication.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,6 @@ def test_ShowPassingFlash(scene):
4242
scene.play(ShowPassingFlash(square.copy()))
4343

4444

45-
@frames_comparison(last_frame=False)
46-
def test_ShowCreationThenFadeOut(scene):
47-
square = Square()
48-
scene.add(square)
49-
scene.play(ShowCreationThenFadeOut(square.copy()))
50-
51-
5245
@frames_comparison(last_frame=False)
5346
def test_ApplyWave(scene):
5447
square = Square()

0 commit comments

Comments
 (0)