Phaser API Documentation

  Version: 
JSONAnimation
Properties:
name type description
key string

The key that the animation will be associated with. i.e. sprite.animations.play(key)

type string

A frame based animation (as opposed to a bone based animation)

frames Array.<Phaser.Types.Animations.JSONAnimationFrame>

An array of the AnimationFrame objects inside this Animation.

frameRate number

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

duration number

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

skipMissedFrames boolean

Skip frames if the time lags, or always advanced anyway?

delay number

Delay before starting playback. Value given in milliseconds.

repeat number

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

repeatDelay number

Delay before the animation repeats. Value given in milliseconds.

yoyo boolean

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

showOnStart boolean

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

hideOnComplete boolean

Should sprite.visible = false when the animation finishes?

Type:
object
Since: 3.0.0