Skip to main content

Module sprite

Module sprite 

Source
Expand description

Validated sprite regions and CPU-only animation with explicit simulation time.

Structs§

AnimationClip
Immutable named clip. Share with Arc between independent players.
AnimationCompleted
A one-shot completion returned exactly once by AnimationPlayer::advance. Can be sent to crate::events::Events; retains the completed clip even if the player immediately switches to another clip.
AnimationPlayer
CPU playback cursor. Drawing/reading a frame never changes playback. Advancement uses integer nanoseconds and binary frame lookup, so large time steps do not iterate over every crossed frame or loop.
SpriteFrame
One selected sprite-sheet region and its simulation duration.
SpriteRegion
A positive, axis-aligned source rectangle in top-left texture pixel coordinates. Bounds against an actual texture are checked at drawing time.
SpriteTransform
Sprite destination geometry in world units, with positive size and explicit pivot. Flips change texture sampling; they do not move the pivot or geometry.

Enums§

PlaybackMode
Behavior at the end of a clip.
SpriteError
Invalid sprite geometry or animation definition.