initialises a new instance of a Sprite.
Configuration properties for the sprite.
ReadonlyactionsActions advanced for this object as active game time elapses.
ReadonlyidUnique identifier for the game object.
Whether the sprite is currently registered with the engine.
Static_Static helper for tests to bypass Registry circularity if mocked.
Whether a named clip is advancing.
The bounds component for this object, defining its physical area.
Number of columns in the spritesheet.
The selected named clip, including clips paused or holding their final pose.
The zero-based offset of the displayed frame within the selected clip.
The legacy frame index. Assigning it clears the selected named clip.
Exclusive end of the legacy animation loop.
Whether the sprite is horizontally flipped.
Duration of each legacy animation frame in milliseconds.
The pixel height of one source grid cell.
The pixel width of one source grid cell.
The image element used by the sprite.
The tag component for this object, managing its name and rendering order.
Number of rows in the spritesheet.
First frame in the legacy animation loop.
The transform component for this object, managing position and scale.
Adds a component to this game object.
The component instance to add.
Removes this object from the active scene or global engine loop.
Emits a custom event on this object's event bus.
The event type.
Optionaldetail: unknown
Optional data to pass with the event.
Retrieves a component from this object by its class.
The class of the component to retrieve.
The component instance, or undefined if not found.
Checks if this object has a component of the specified class.
The class to check for.
True if the component exists.
Stops listening for an event on this object's event bus.
The event type.
The function to remove.
Listens for an event on this object's event bus.
The event type.
The function to run when the event occurs.
Pauses the named clip while keeping the sprite registered and visible.
Registers the sprite and starts its legacy grid range.
Starts a named clip on game time and registers the sprite if needed. Repeating the same request keeps its progress, resumes a paused clip, or holds a completed pose. Changing clips or modes, or setting restart, starts from the first frame.
Registers this object with the active scene or global engine loop.
Removes a component from this game object by its class.
The class of the component to remove.
Stops sprite playback and removes it from the engine.
Stops the named clip and holds its pose. The next play starts from the first frame.
A high-level object that represents an animated sprite. Wraps SpriteComponent and TransformComponent for ease of use.