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


NameDescriptionType
is_doneIndicates if the animation is completebool
start_posThe starting position of the animationVec2
end_posThe ending position of the animationVec2

Methods


Step

step() Vec2

Advance the animation by one step.

Returns

Vec2 : The current position of the animation.

Pause

pause() None

Pause the animation.

Resume

resume() None

Resume the animation.

Restart

restart() None

Restart the animation.

Reverse

reverse() None

Reverse the direction of the animation.