SpineBindVisual
ceramic.SpineBindVisual (Class)
Utility class for binding Ceramic visuals to Spine skeleton slots.
This class provides static methods to:
- Show/hide specific slots
- Attach Ceramic visuals (Text, Quad, Mesh, etc.) to Spine slots
- Synchronize visual properties with slot transforms and colors
Common use cases include:
- Attaching particle effects to bones
- Displaying dynamic text on characters
- Overlaying custom graphics on skeleton parts
- Creating hybrid Spine/Ceramic animations
Usage Example
// Attach a text label to a character's head
var nameText = new Text();
nameText.content = "Player 1";
SpineBindVisual.bindVisual(spine, "head_slot", nameText, 0, -50);
// Hide a slot
SpineBindVisual.hideSlot(spine, "weapon_slot");
See: SpineBindVisualOptions, Spine
Static Members
Hides a specific slot in the Spine skeleton.
The slot will not be rendered but continues to be updated. Use this to dynamically hide equipment, body parts, etc.
Name | Type | Description |
---|---|---|
spine |
Spine | The Spine instance |
slotName |
String | Name of the slot to hide |
Shows a previously hidden slot in the Spine skeleton.
Reverses the effect of hideSlot()
.
Name | Type | Description |
---|---|---|
spine |
Spine | The Spine instance |
slotName |
String | Name of the slot to show |
spine
bindVisual(spine: Spine, slotName: String, visual: Visual, ?offsetX: Float = 0.0, ?offsetY: Float = 0.0): SpineBindVisualOptions
Binds a Ceramic visual to a Spine slot.
The visual will follow the slot's transform (position, rotation, scale) and optionally inherit its color and alpha. The visual becomes a child of the Spine instance for proper rendering order.
Name | Type | Default | Description |
---|---|---|---|
spine |
Spine | The Spine instance to bind to | |
slotName |
String | Name of the slot to follow | |
visual |
Visual | The Ceramic visual to attach | |
offsetX |
Float | 0.0 |
Horizontal offset from the slot position |
offsetY |
Float | 0.0 |
Vertical offset from the slot position |
Returns | Description |
---|---|
SpineBindVisualOptions | Configuration options for customizing the binding behavior |