Phaser API Documentation

name type arguments description
key string | Phaser.Animations.Animation

The string-based key of the animation to play, or an Animation instance.

frameRate number <optional>

The frame rate of playback in frames per second (default 24 if duration is null)

duration number <optional>

How long the animation should play for in milliseconds. If not given its derived from frameRate.

delay number <optional>

Delay before starting playback. Value given in milliseconds.

repeat number <optional>

Number of times to repeat the animation (-1 for infinity)

repeatDelay number <optional>

Delay before the animation repeats. Value given in milliseconds.

yoyo boolean <optional>

Should the animation yoyo? (reverse back down to the start) before repeating?

showOnStart boolean <optional>

Should sprite.visible = true when the animation starts to play?

hideOnComplete boolean <optional>

Should sprite.visible = false when the animation finishes?

startFrame number <optional>

The frame of the animation to start playback from.

timeScale number <optional>

The time scale to be applied to playback of this animation.

Since: 3.50.0