SpriteAnimation
Since 0.6
Fields
| Field | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
name | string | yes | What animation and ctx.sprite.play call it. Unique within the sprite. | ||
frames | string[] | yes | Frame names, in the order they play; a name may repeat. At least one, and each a frame of this sprite (sprite-frame-missing). | ||
fps | number | yes | Frames per second, above zero. | ||
loop | boolean | no | true | Default true. A non-looping animation stops on its last frame and raises the animation-end event (or the event a ctx.sprite.play names). | |
durations | number[] | no | Seconds each entry of frames shows for, one per entry, each above zero: for frames that hold for different times. Absent: every frame shows for 1 / fps. |