Spine Animations
You can add animated interactable objects to your game using our existing library of 50k+ Spine rigs.
When to use Spine_Animator vs Spine_Instance
Spine API reference (CSL)
// Component — attached to world entities
Spine_Animator :: class : Component {
depth_offset: float;
layer: s32;
mask_in_shadow: bool;
instance: Spine_Instance #read_only;
// Visuals
color_multiplier: v4;
scale: v2;
speed_multiplier: float;
state_machine: State_Machine #read_only;
set_skeleton :: method(asset: Spine_Asset) -> u64;
get_skeleton :: method(id: u64 = 0) -> Spine_Asset;
set_animation :: method(animation: string, loop: bool, track: s64, speed: float = 1);
// Skins
set_skin :: method(skin: string);
enable_skin :: method(skin: string);
disable_skin :: method(skin: string);
disable_all_skins :: method();
refresh_skins :: method();
get_skins :: method() -> []string;
set_to_setup_pose :: method();
// Bone local offsets (advanced)
get_bone_local_position :: method(bone_name: string) -> v2;
set_bone_local_position :: method(bone_name: string, position: v2);
// Optional: drive animations via a state machine
set_state_machine :: method(machine: State_Machine, transfer_ownership: bool);
set_color_replace_color :: method(color: Color_Replace_Color);
set_material :: method(material: Material, transfer_ownership: bool);
get_tint :: method() -> v4;
set_tint :: method(tint: v4);
set_destroy_entity_when_done_current_animation :: method(enabled: bool);
}Adding animated objects to your world
Examples
Openable Chest
Walking Chicken
Driveable Car
Skins (variants/outfits)
Animation events
Standalone instances and UI.spine
State machines (optional, for complex animation logic)
What a state machine does
Minimal example: idle/walk + attack trigger
Troubleshooting
Custom Player Skins/Animations
The Spine Rig Format
Creating your own animations
Export Format
Last updated