Replies: 2 comments
-
Just convenience for calling it similar to |
Beta Was this translation helpful? Give feedback.
0 replies
-
✅ Here is an example of how it could look like: my_animation = Succession(dot1.animate.move_to(dot2), Wait(1), dot2.animate.move_to(dot3)) ❌ This wouldn't work: my_animation = Succession(dot1.animate.move_to(dot2), self.wait(1), dot2.animate.move_to(dot3))
def wait(
self,
duration: float = DEFAULT_WAIT_TIME,
stop_condition: Callable[[], bool] | None = None,
frozen_frame: bool | None = None,
):
"""Plays a "no operation" animation.
Parameters
----------
duration
The run time of the animation.
stop_condition
A function without positional arguments that is evaluated every time
a frame is rendered. The animation only stops when the return value
of the function is truthy, or when the time specified in ``duration``
passes.
frozen_frame
If True, updater functions are not evaluated, and the animation outputs
a frozen frame. If False, updater functions are called and frames
are rendered as usual. If None (the default), the scene tries to
determine whether or not the frame is frozen on its own.
See also
--------
:class:`.Wait`, :meth:`.should_mobjects_update`
"""
self.play(
Wait(
run_time=duration,
stop_condition=stop_condition,
frozen_frame=frozen_frame,
)
) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Other than one is a class method and another is a class, in practice, what is the difference between the two, i.e. when to use one and when the other?
Beta Was this translation helpful? Give feedback.
All reactions