EasingAnimation
An animation for easing transitions between two points.
Constructor
EasingAnimation(
ease_func: Callable[[float], float],
duration: float
)Parameters
ease_func: Easing function that maps [0, 1] → [0, 1].duration: Time in seconds for full animation.
Properties
| Name | Description | Type |
|---|---|---|
is_done | Indicates if the animation is complete | bool |
start_pos | The starting position of the animation | Vec2 |
end_pos | The ending position of the animation | Vec2 |
Methods
Step
step() → Vec2Advance the animation by one step.
Returns
Vec2 : The current position of the animation.
Pause
pause() → NonePause the animation.
Resume
resume() → NoneResume the animation.
Restart
restart() → NoneRestart the animation.
Reverse
reverse() → NoneReverse the direction of the animation.