SpriteSheetAnimation

Entitytracker.Modelceramic.SpriteSheetAnimation (Class)

Represents a named animation sequence within a sprite sheet. Contains an ordered list of frames with timing information.

Animations are typically created by:

  • Parsing from Aseprite JSON frame tags
  • Using SpriteSheet.addGridAnimation() for grid-based sheets
  • Manual construction for custom animations

The total duration is computed automatically from all frame durations.

Instance Members

sprite
name: String

The unique name identifier for this animation. Used to reference the animation when playing sprites.


Ordered array of frames that make up this animation. Each frame contains a texture region and duration.


sprite
duration: Float

Compute the total duration of this animation in seconds. This is the sum of all individual frame durations.


sprite
invalidateName(): Void

sprite
invalidateFrames(): Void

sprite
invalidateDuration(): Void

sprite
new(): Void

Private Members

sprite
unobservedName: String

sprite
unobservedFrames: ReadOnlyArray<SpriteSheetFrame>

sprite
unobservedDuration: Float

sprite
emitNameChange(current: String, previous: String): Void

Event when name field changes.

Name Type
current String
previous String

sprite
emitFramesChange(current: ReadOnlyArray<SpriteSheetFrame>, previous: ReadOnlyArray<SpriteSheetFrame>): Void

Event when frames field changes.

Name Type
current ReadOnlyArray<SpriteSheetFrame>
previous ReadOnlyArray<SpriteSheetFrame>

sprite
emitDurationChange(current: Float, previous: Float): Void

Event when duration field changes.

Name Type
current Float
previous Float

Metadata

Name Parameters
:build tracker.macros.EventsMacro.build()
:autoBuild tracker.macros.EventsMacro.build()
:build ceramic.macros.EntityMacro.buildForCompletion()
:autoBuild ceramic.macros.EntityMacro.buildForCompletion()
:build tracker.macros.ObservableMacro.build()
:autoBuild tracker.macros.ObservableMacro.build()
:build tracker.macros.SerializableMacro.build()
:autoBuild tracker.macros.SerializableMacro.build()