animator.anim.Anim¶
- class animator.anim.Anim(duration: float, ease: Callable[[float], float] = <function get_pow_inout.<locals>.f>)¶
Bases:
object
- __init__(duration: float, ease: Callable[[float], float] = <function get_pow_inout.<locals>.f>) None ¶
- Parameters
duration – The duration of the animation in seconds. Negative values will keep the animation running
forever. If a negative value is used, the absolute value can be used as some sort of rate. :param ease_func: The easing function to use for the animation.
Methods
__init__
(duration[, ease])- param duration
The duration of the animation in seconds. Negative values will keep the animation running
end
()Called once after the animation ends.
start
()Called once before the animation starts.
update
(t)Called every frame with the time since the animation started.
- class State(value)¶
Bases:
enum.Enum
The state of an animation.
- FINISHED = 2¶
The animation has finished.
- IDLE = 0¶
The animation has not started.
- RUNNING = 1¶
The animation is running.