name | type | arguments | Default | description |
---|---|---|---|---|
key | string | <optional> |
The key that the animation will be associated with. i.e. sprite.animations.play(key) |
|
frames | string | Array.<Phaser.Types.Animations.AnimationFrame> | <optional> |
Either a string, in which case it will use all frames from a texture with the matching key, or an array of Animation Frame configuration objects. |
|
sortFrames | boolean | <optional> | true |
If you provide a string for |
defaultTextureKey | string | <optional> | null |
The key of the texture all frames of the animation will use. Can be overridden on a per frame basis. |
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. |
|
skipMissedFrames | boolean | <optional> | true |
Skip frames if the time lags, or always advanced anyway? |
delay | number | <optional> | 0 |
Delay before starting playback. Value given in milliseconds. |
repeat | number | <optional> | 0 |
Number of times to repeat the animation (-1 for infinity) |
repeatDelay | number | <optional> | 0 |
Delay before the animation repeats. Value given in milliseconds. |
yoyo | boolean | <optional> | false |
Should the animation yoyo? (reverse back down to the start) before repeating? |
showOnStart | boolean | <optional> | false |
Should sprite.visible = true when the animation starts to play? |
hideOnComplete | boolean | <optional> | false |
Should sprite.visible = false when the animation finishes? |
name | type | arguments | description |
---|---|---|---|
key | string | <optional> |
The key of the texture within the Texture Manager to use for this Animation Frame. |
frame | string | number | <optional> |
The key, or index number, of the frame within the texture to use for this Animation Frame. |
duration | number | <optional> |
The duration, in ms, of this frame of the animation. |
visible | boolean | <optional> |
Should the parent Game Object be visible during this frame of the animation? |
name | type | arguments | Default | description |
---|---|---|---|---|
prefix | string | <optional> | '' |
The string to append to every resulting frame name if using a range or an array of |
start | number | <optional> | 0 |
If |
end | number | <optional> | 0 |
If |
suffix | string | <optional> | '' |
The string to append to every resulting frame name if using a range or an array of |
zeroPad | number | <optional> | 0 |
The minimum expected lengths of each resulting frame's number. Numbers will be left-padded with zeroes until they are this long, then prepended and appended to create the resulting frame name. |
outputArray | Array.<Phaser.Types.Animations.AnimationFrame> | <optional> | [] |
The array to append the created configuration objects to. |
frames | boolean | Array.<number> | <optional> | false |
If provided as an array, the range defined by |
name | type | arguments | Default | description |
---|---|---|---|---|
start | number | <optional> | 0 |
The starting frame of the animation. |
end | number | <optional> | -1 |
The ending frame of the animation. |
first | boolean | number | <optional> | false |
A frame to put at the beginning of the animation, before |
outputArray | Array.<Phaser.Types.Animations.AnimationFrame> | <optional> | [] |
An array to concatenate the output onto. |
frames | boolean | Array.<number> | <optional> | false |
A custom sequence of frames. |
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? |
name | type | description |
---|---|---|
key | string |
The key of the Texture this AnimationFrame uses. |
frame | string | number |
The key of the Frame within the Texture that this AnimationFrame uses. |
duration | number |
Additional time (in ms) that this frame should appear for during playback. |
name | type | description |
---|---|---|
anims | Array.<Phaser.Types.Animations.JSONAnimation> |
An array of all Animations added to the Animation Manager. |
globalTimeScale | number |
The global time scale of the Animation Manager. |
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. |