Crate rusty_spine

Source
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.
AnimationState
Applies animations over time, queues animations for later playback, mixes (crossfading) between animations, and applies multiple animations on top of each other (layering).
AnimationStateData
Animation settings used to instantiate AnimationState.
Atlas
An atlas loaded from Spine’s .atlas file format.
Attachment
Slot attachments.
AttachmentEntry
An Skin’s Attachment and slot index.
AttachmentLoader
A loader for creating custom attachments.
Bone
A bone within the Skeleton hierarchy.
BoneData
Static bone data imported from Spine.
BoneHandle
A storeable reference to a Bone.
BoundingBoxAttachment
An attachment made up of vertices for use in collision detection, hitboxes, etc.
ClippingAttachment
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.
EventData
Static event data imported from Spine.
IkConstraint
Spine API Reference
IkConstraintData
Stores the setup pose for an IkConstraint.
MeshAttachment
A deforming mesh attachment.
PathAttachment
An attachment of vertices forming a Bezier curve.
PathConstraint
Spine API Reference
PathConstraintData
Stores the setup pose for a PathConstraint.
PhysicsConstraint
Spine API Reference
PhysicsConstraintData
Stores the setup pose for a PhysicsConstraint.
PointAttachment
A lightweight, single point attachment with a translation and rotation.
RegionAttachment
An attachment which draws a texture.
RegionProps
Properties for updating RegionAttachment.
RendererObject
A wrapper around a user data void pointer found on a few Spine C structs.
Skeleton
A live Skeleton instance created from SkeletonData.
SkeletonBinary
A loader for Spine binary files.
SkeletonClipping
Active state for ClippingAttachment during mesh generation.
SkeletonData
Static skeleton data imported from Spine.
SkeletonJson
A loader for Spine json files.
Skin
A container for attachments which can be applied to a skeleton.
SkinHandle
A storeable reference to a Skin.
Slot
A slot for an attachment.
SlotData
Static slot data imported from Spine.
SlotHandle
A storeable reference to a Slot.
TextureRegion
A region of a texture, usually imported from an AtlasRegion.
TrackEntry
Stores settings and other state for the playback of an animation on an AnimationState track.
TrackEntryHandle
A storeable reference to a TrackEntry.
TransformConstraint
Spine API Reference
TransformConstraintData
Stores the setup pose for a TransformConstraint.

Enums§

AnimationEvent
A wrapper for Event that makes events slightly nicer to work with in Rust.
AttachmentType
The type variants of an Attachment.
BlendMode
The variants of blend modes supported by Spine.
EventType
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.
PositionMode
Controls how the first bone is positioned along the path.
RotateMode
Controls how bones are rotated, translated, and scaled to match the path.
SpacingMode
Controls how the first bone is positioned along the path.
SpineError
Error types when interacting with the Spine runtime.