Skip to content

Commit 90d75b5

Browse files
committed
Export non-standard funcs and leave standard as it is
1 parent b83b3e3 commit 90d75b5

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

manim/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
from .utils.file_ops import *
7575
from .utils.paths import *
7676
from .utils.rate_functions import *
77+
from .utils import rate_functions
7778
from .utils.simple_functions import *
7879
from .utils.sounds import *
7980
from .utils.space_ops import *

manim/utils/rate_functions.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
#. Ease Out - The animation has a smooth end.
1212
#. Ease In Out - The animation has a smooth start as well as smooth end.
1313
14+
.. note:: The standard functions are not exported, so to use them you do something like this:
15+
rate_func=rate_functions.ease_in_sine
16+
On the other hand, the non-standard functions, which are used more commonly, are exported and can be used directly.
17+
1418
.. manim:: RateFunctions1Example
1519
1620
class RateFunctions1Example(Scene):
@@ -33,9 +37,9 @@ def construct(self):
3337
Write(VGroup(label1, label2, label3)),
3438
)
3539
self.play(
36-
MoveAlongPath(dot1, line1, rate_func=ease_in_sine),
37-
MoveAlongPath(dot2, line2, rate_func=ease_out_sine),
38-
MoveAlongPath(dot3, line3, rate_func=ease_in_out_sine),
40+
MoveAlongPath(dot1, line1, rate_func=rate_functions.ease_in_sine),
41+
MoveAlongPath(dot2, line2, rate_func=rate_functions.ease_out_sine),
42+
MoveAlongPath(dot3, line3, rate_func=rate_functions.ease_in_out_sine),
3943
run_time=7
4044
)
4145
self.wait()

0 commit comments

Comments
 (0)