EasingAnimation
A class for animating values over time using easing functions.
Constructor
-
EasingAnimation(
ease_func: Callable[[SupportsFloat], float],
duration: SupportsFloat
) → EasingAnimation
A class for animating values over time using easing functions.
Properties
| Name | Description | Type |
|---|---|---|
end_pos | The ending position of the animation. | Vec2 |
is_done | Check whether the animation has finished. | bool |
start_pos | The starting position of the animation. | Vec2 |
Methods
Pause
pause() → NonePause the animation's progression.
Restart
restart() → NoneRestart the animation from the beginning.
Resume
resume() → NoneResume the animation from its current state.
Reverse
reverse() → NoneReverse the direction of the animation.
Step
step() → Vec2Advance the animation and get its current position.
Returns
Vec2 : Interpolated position.