AsepriteTag

ceramic.AsepriteTag (Class)

Represents an animation tag from an Aseprite file.

Tags define named animation sequences within the sprite's frames. Each tag marks a range of frames that can be played as a loop or one-shot animation with a specific playback direction.

Tags are commonly used to organize different character animations like "idle", "walk", "jump", "attack" within a single Aseprite file.

See: AsepriteData for the parent data structure, SpriteSheet for animation playback using tags

Static Members

ase
fromChunk(chunk: ase.chunks.Tag): AsepriteTag

Creates an AsepriteTag from raw tag chunk data.

Converts the file format representation into a more convenient structure for use in the engine.

Name Type Description
chunk ase.chunks.Tag The tag data from the Aseprite file
Returns Description
AsepriteTag A new AsepriteTag instance

Instance Members

ase
name: String

The name of this animation tag. Used to identify and play specific animations (e.g., "walk", "idle").


ase
fromFrame: Int

The first frame index of this animation (0-based, inclusive).


ase
toFrame: Int

The last frame index of this animation (0-based, inclusive).


ase
direction: Int

The playback direction for this animation:

  • 0: Forward (play from fromFrame to toFrame)
  • 1: Reverse (play from toFrame to fromFrame)
  • 2: Ping-pong (play forward then reverse)

ase
new(name: String, fromFrame: Int, toFrame: Int, direction: Int): Void
Name Type Description
name String * The name of this animation tag. Used to identify and play specific animations (e.g., "walk", "idle").
fromFrame Int * The first frame index of this animation (0-based, inclusive).
toFrame Int * The last frame index of this animation (0-based, inclusive).
direction Int * The playback direction for this animation: - 0: Forward (play from fromFrame to toFrame) - 1: Reverse (play from toFrame to fromFrame) - 2: Ping-pong (play forward then reverse)

Metadata

Name Parameters
:structInit -