new SpriteAnimation(name, frameList, frameRate, playModeopt) → {void}
CReate a new SpriteAnimation
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
name |
string |
Name of the animation |
||
frameList |
object |
Wither an array of cell indexes, or an object {startFrame, frameCount} |
||
frameRate |
integer |
Frames per second the animation should play at |
||
playMode |
string |
<optional> |
"loop" |
Play mode for the sprite: loop, forward, reverse, pingpong |
Properties:
Name | Type | Description |
---|---|---|
name |
string |
Name of the animation |
frameRate |
integer |
Frames per second the animation should play at |
frameList |
object |
Array of the regions of the each cell of this animation |
playMode |
string |
Play mode for the sprite: loop, forward, reverse, pingpong |
- Source: