Expand description
Spine runtime for Rust (and wasm!) transpiled from the official C Runtime. Supports Spine 4.2.
For a very quick working example, see controller.
To load a Skeleton, see SkeletonJson or SkeletonBinary.
To load textures, see extension::set_create_texture_cb.
To set automatic mix durations (crossfading) between animations, see
AnimationStateData.
To find and manage bones, see Bone.
To receive animation events, see AnimationState::set_listener.
Modules§
- atlas
- Types related to atlases.
- c
- Direct access to the Spine C Runtime.
- c_
interface - Helper structs for interacting with C pointers in safe rust.
- controller
- Provides
SkeletonController, a helper struct for updating and drawing Spine skeletons. - draw
- Helpers types for drawing Spine skeletons.
- extension
- Allow overriding the Spine C Runtime extension functions.
Structs§
- Animation
- Stores timelines for animating a skeleton.
- Animation
State - Applies animations over time, queues animations for later playback, mixes (crossfading) between animations, and applies multiple animations on top of each other (layering).
- Animation
State Data - Animation settings used to instantiate
AnimationState. - Atlas
- An atlas loaded from Spine’s
.atlasfile format. - Attachment
- Slot attachments.
- Attachment
Entry - An
Skin’sAttachmentand slot index. - Attachment
Loader - A loader for creating custom attachments.
- Bone
- A bone within the
Skeletonhierarchy. - Bone
Data - Static bone data imported from Spine.
- Bone
Handle - A storeable reference to a
Bone. - Bounding
BoxAttachment - An attachment made up of vertices for use in collision detection, hitboxes, etc.
- Clipping
Attachment - An attachment which clips rendering of other attachments.
- Color
- RGBA F32 color that is byte-compatible with the Spine runtime.
- Event
- Events fired from animations.
- Event
Data - Static event data imported from Spine.
- IkConstraint
- Spine API Reference
- IkConstraint
Data - Stores the setup pose for an
IkConstraint. - Mesh
Attachment - A deforming mesh attachment.
- Path
Attachment - An attachment of vertices forming a Bezier curve.
- Path
Constraint - Spine API Reference
- Path
Constraint Data - Stores the setup pose for a
PathConstraint. - Physics
Constraint - Spine API Reference
- Physics
Constraint Data - Stores the setup pose for a
PhysicsConstraint. - Point
Attachment - A lightweight, single point attachment with a translation and rotation.
- Region
Attachment - An attachment which draws a texture.
- Region
Props - Properties for updating
RegionAttachment. - Renderer
Object - A wrapper around a user data void pointer found on a few Spine C structs.
- Skeleton
- A live Skeleton instance created from
SkeletonData. - Skeleton
Binary - A loader for Spine binary files.
- Skeleton
Clipping - Active state for
ClippingAttachmentduring mesh generation. - Skeleton
Data - Static skeleton data imported from Spine.
- Skeleton
Json - A loader for Spine json files.
- Skin
- A container for attachments which can be applied to a skeleton.
- Skin
Handle - A storeable reference to a
Skin. - Slot
- A slot for an attachment.
- Slot
Data - Static slot data imported from Spine.
- Slot
Handle - A storeable reference to a
Slot. - Texture
Region - A region of a texture, usually imported from an
AtlasRegion. - Track
Entry - Stores settings and other state for the playback of an animation on an
AnimationStatetrack. - Track
Entry Handle - A storeable reference to a
TrackEntry. - Transform
Constraint - Spine API Reference
- Transform
Constraint Data - Stores the setup pose for a
TransformConstraint.
Enums§
- Animation
Event - A wrapper for
Eventthat makes events slightly nicer to work with in Rust. - Attachment
Type - The type variants of an
Attachment. - Blend
Mode - The variants of blend modes supported by Spine.
- Event
Type - The variants of event types.
- Inherit
- The inherited transform for how bones are affected by their parents.
- Physics
- Determines how physics and other non-deterministic updates are applied.
- Position
Mode - Controls how the first bone is positioned along the path.
- Rotate
Mode - Controls how bones are rotated, translated, and scaled to match the path.
- Spacing
Mode - Controls how the first bone is positioned along the path.
- Spine
Error - Error types when interacting with the Spine runtime.