Creates a new animation player for the given animation and calling the given draw callback for each animation frame.
The animation to play.
Callback to call on each frame update. This callback is responsible for actually showing the animation frame to the user.
Returns the current animation frame.
The current animation frame.
Returns the animation height in pixels.
The animation height in pixels.
Returns the delay to wait before rendering the next frame.
The next delay in milliseconds.
Returns the number of time units to wait before rendering the next frame.
The animation to play.
The next delay in time units.
Returns the animation speed in milliseconds per time unit. Default is 50.
The animation speed in milliseconds per time unit.
Returns the animation width in pixels.
The animation width in pixels.
Initializes the player. Called for initialization when player is created and each time it is reset.
The animation to play.
The base frame to start the animation with.
Advances the animation to the next frame.
Creates and returns the next frame in the animation.
TODO Do we need a return value here?
The animation to play.
The current frame.
The next frame.
Stops and resets the animation to the base frame.
Sets the animation speed in milliseconds per time unit. Default is 50.
The animation speed to set.
Starts the animation if not already running.
Stops the animation if currently running.
Generated using TypeDoc
Abstract base class for animation player implementations.