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


NameDescriptionType
end_posThe ending position of the animation.Vec2
is_doneCheck whether the animation has finished.bool
start_posThe starting position of the animation.Vec2

Methods


Pause

pause() None

Pause the animation's progression.

Restart

restart() None

Restart the animation from the beginning.

Resume

resume() None

Resume the animation from its current state.

Reverse

reverse() None

Reverse the direction of the animation.

Step

step() Vec2

Advance the animation and get its current position.

Returns

Vec2 : Interpolated position.