Talos docs

SpriteAnimation

Since 0.6
Plain text

Fields

FieldTypeRequiredDefaultAllowed valuesDescription
namestringyesWhat animation and ctx.sprite.play call it. Unique within the sprite.
framesstring[]yesFrame names, in the order they play; a name may repeat. At least one, and each a frame of this sprite (sprite-frame-missing).
fpsnumberyesFrames per second, above zero.
loopbooleannotrueDefault true. A non-looping animation stops on its last frame and raises the animation-end event (or the event a ctx.sprite.play names).
durationsnumber[]noSeconds 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.