AnimatedItem.animation.on_track_time method

on_track_time(self, time: float, callback: Callable[[], None]) -> None:

Creates a handler that triggers on specified animation track time for the current animation.

Note: This handler is disposed when a new animation is played. Track time is normalized by default.

Parameters

  • time: float

    animation track time.

  • callback: Callable[[], None]

    function to call on specified track time.