SpineBindVisualOptions

ceramic.SpineBindVisualOptions (Class)

Configuration options for binding a Ceramic visual to a Spine slot.

This class controls how a visual synchronizes with a Spine slot's properties. It's returned by SpineBindVisual.bindVisual() and allows fine-tuning the binding behavior after creation.

Usage Example

var options = SpineBindVisual.bindVisual(spine, "weapon", sword);

// Customize binding behavior
options.drawDefault = true; // Show original slot attachment too
options.bindColor = false;  // Don't sync color
options.offsetY = -10;      // Adjust position

// Later, unbind the visual
options.unbind();

Instance Members

spine
drawDefault: Bool

Whether to render the original slot attachment. Set to true to display both the original attachment and the bound visual. Default is false (only show the bound visual).


spine
offsetX: Float

Horizontal offset from the slot's position in pixels. Positive values move the visual to the right.


spine
offsetY: Float

Vertical offset from the slot's position in pixels. Positive values move the visual down.


spine
bindTransform: Bool

Whether to apply the slot's transform (position, rotation, scale) to the visual. Disable this if you only want to sync other properties like color. Default is true.


spine
bindColor: Bool

Whether to apply the slot's color tint to the visual. Works with Text, Quad, Mesh, and any visual with a color property. Default is true.


spine
bindAlpha: Bool

Whether to apply the slot's alpha transparency to the visual. The slot's alpha is multiplied with the visual's existing alpha. Default is true.


spine
bindDepth: Bool

Whether to apply the slot's rendering depth (z-order) to the visual. Ensures the visual renders at the correct layer relative to other slots. Default is true.


spine
bindBlending: Bool

Whether to apply the slot's blend mode to the visual. Synchronizes additive blending when the slot uses it. Default is true.


spine
compensateRegionRotation: Bool

Whether to compensate for region attachment rotation. Enable this if your visual appears rotated incorrectly when bound to slots with rotated region attachments. Default is false.


spine
manageActiveProperty: Bool

Controls the visual's active state based on slot visibility. When true, sets visual.active = false when the slot has no attachment, and visual.active = true when it does. Default is true.


spine
skipIfInvisible: Bool

Skip updating the visual if it's not visible. This optimization avoids unnecessary calculations for hidden visuals. Default is true.


spine
resetTransformOnUnbind: Bool

Whether to reset the visual's transform to identity when unbinding. Prevents the visual from keeping the last slot transform. Default is true.


spine
destroyVisualOnUnbind: Bool

Whether to destroy the visual when unbinding. Use this for temporary visuals that should be cleaned up automatically. Default is false.


spine
slotName: String

The name of the slot this binding is attached to. Set automatically by SpineBindVisual.bindVisual().


spine
spine: Spine

The Spine instance this binding is attached to. Set automatically by SpineBindVisual.bindVisual().


spine
spineData: SpineData

The SpineData of the bound Spine instance. Set automatically by SpineBindVisual.bindVisual().


spine
visual: Visual

The visual being controlled by this binding. Set automatically by SpineBindVisual.bindVisual().


spine
textVisual: Text

If the visual is a Text instance, this contains the type-cast reference. Used internally for optimized text property access.


spine
unbind(): Void

Removes the binding between the visual and the Spine slot.

This method:

  • Unregisters all event handlers
  • Optionally resets the visual's transform (see resetTransformOnUnbind)
  • Optionally destroys the visual (see destroyVisualOnUnbind)

After calling unbind(), this options object should not be used again.


spine
new(): Void

Private Members

spine
didUpdateSlot: Bool

spine
handleUpdateSlot(): Void

spine
handleBeginRender(): Void

spine
handleEndRender(): Void

Metadata

Name Parameters
:allow ceramic.SpineBindVisual