SpriteSheetFrame

Entitytracker.Modelceramic.SpriteSheetFrame (Class)

Represents a single frame within a sprite animation. Contains the texture region to display and how long to display it.

Frames are the building blocks of animations, each pointing to a specific area of the texture atlas with timing information.

Instance Members

sprite
duration: Float

Duration to display this frame in seconds. Used during animation playback to determine frame timing.


sprite
region: TextureAtlasRegion

The texture region (sub-rectangle) to display for this frame. Points to a specific area within the texture atlas.


sprite
invalidateDuration(): Void

sprite
invalidateRegion(): Void

sprite
new(atlas: TextureAtlas, name: String, ?page: Int = 0, ?region: TextureAtlasRegion): Void

Create a new sprite sheet frame.

Name Type Default Description
atlas TextureAtlas The texture atlas containing the frame
name String Unique name for the texture region
page Int 0 Atlas page index (default: 0)
region TextureAtlasRegion (optional) Optional pre-existing region to use

Private Members

sprite
unobservedDuration: Float

sprite
unobservedRegion: TextureAtlasRegion

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

Event when duration field changes.

Name Type
current Float
previous Float

sprite
emitRegionChange(current: TextureAtlasRegion, previous: TextureAtlasRegion): Void

Event when region field changes.

Name Type
current TextureAtlasRegion
previous TextureAtlasRegion

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()