Skip to content

SpineModuleController

Defined in: spine/SpineController.ts:51

new SpineModuleController(raw, api): SpineModuleController

Defined in: spine/SpineController.ts:56

SpineWasmModule

SpineWrappedAPI

SpineModuleController

get raw(): SpineWasmModule

Defined in: spine/SpineController.ts:66

SpineWasmModule

addAnimation(instanceId, animation, loop?, delay?, track?): boolean

Defined in: spine/SpineController.ts:150

number

string

boolean = true

number = 0

number = 0

boolean


advanceAndApply(instanceId, dt): void

Defined in: spine/SpineController.ts:275

The animation clock onto the bones’ LOCAL transforms — see spineBounds and the runtime’s ensurePose for why this is not the whole pose.

number

number

void


animationDuration(skeletonHandle, animation): number

Defined in: spine/SpineController.ts:285

Seconds; negative where this skeleton has no such animation.

number

string

number


clipBudget(instanceId): SpineClipBudget | null

Defined in: spine/SpineController.ts:246

What this instance’s clipping costs the engine in the pose it is in, as work rather than time: a coefficient measured on one machine and compiler stops being true, and the three quantities below do not.

null where the runtime cannot answer — 2.1 and 4.3 have no counted walk.

number

SpineClipBudget | null


collectEvents(instanceId): RawSpineEvent[]

Defined in: spine/SpineController.ts:394

number

RawSpineEvent[]


createInstance(skeletonHandle): number

Defined in: spine/SpineController.ts:119

number

number


destroyInstance(instanceId): void

Defined in: spine/SpineController.ts:123

number

void


enableEvents(instanceId): void

Defined in: spine/SpineController.ts:390

number

void


forEachMeshBatch(instanceId, cb, probe?): void

Defined in: spine/SpineController.ts:335

Iterate this instance’s mesh batches. The views point into wasm scratch and are valid only for the duration of each call, so a consumer copies straight into its own heap and nothing allocates a typed array per batch per frame.

The walk itself is shared with every other skeletal module (see skeletal/meshBatches) — the four readback entry points are packed the same way on the C++ side, so reading them differently per runtime would be two copies of one contract.

number

MeshBatchVisitor

SkeletalProbe

void


getAnimations(instanceId): string[]

Defined in: spine/SpineController.ts:167

number

string[]


getAtlasPageCount(handle): number

Defined in: spine/SpineController.ts:102

number

number


getAtlasPageTextureName(handle, pageIndex): string

Defined in: spine/SpineController.ts:106

number

number

string


getBonePosition(instanceId, boneName): Vec2 | null

Defined in: spine/SpineController.ts:187

number

string

Vec2 | null


getBoneRotation(instanceId, boneName): number

Defined in: spine/SpineController.ts:204

number

string

number


getBoneTree(instanceId): SkeletalBone[] | null

Defined in: spine/SpineController.ts:213

The skeleton as a tree in the pose the instance is in: each bone’s name, parent (-1 for a root), where it starts, the way it points in degrees and how long it is, in skeleton space. Null from a module built before the call existed.

number

SkeletalBone[] | null


getBounds(instanceId): object

Defined in: spine/SpineController.ts:306

number

object

height: number

width: number

x: number

y: number


getLastError(): string

Defined in: spine/SpineController.ts:94

string


getPathConstraintMix(instanceId, name): PathMixData | null

Defined in: spine/SpineController.ts:450

number

string

PathMixData | null


getSkins(instanceId): string[]

Defined in: spine/SpineController.ts:177

number

string[]


getTransformConstraintMix(instanceId, name): TransformMixData | null

Defined in: spine/SpineController.ts:435

number

string

TransformMixData | null


listConstraints(instanceId): ConstraintList

Defined in: spine/SpineController.ts:426

number

ConstraintList


loadSkeleton(skelData, atlasText, isBinary): number

Defined in: spine/SpineController.ts:74

string | Uint8Array<ArrayBufferLike>

string

boolean

number


materializeWorldPose(instanceId, dt): void

Defined in: spine/SpineController.ts:280

The world transforms the local pose implies.

number

number

void


play(instanceId, animation, loop?, track?): boolean

Defined in: spine/SpineController.ts:146

number

string

boolean = true

number = 0

boolean


requiresContinuousWorldPose(skeletonHandle): boolean

Defined in: spine/SpineController.ts:290

Whether this skeleton’s world pose carries state and may not be deferred.

number

boolean


setAtlasPageTexture(handle, pageIndex, textureId, width, height): void

Defined in: spine/SpineController.ts:110

number

number

number

number

number

void


setAttachment(instanceId, slotName, attachmentName): boolean

Defined in: spine/SpineController.ts:359

number

string

string

boolean


setDefaultMix(skeletonHandle, duration): void

Defined in: spine/SpineController.ts:343

number

number

void


setIKTarget(instanceId, constraintName, targetX, targetY, mix): boolean

Defined in: spine/SpineController.ts:367

number

string

number

number

number

boolean


setMixDuration(skeletonHandle, fromAnim, toAnim, duration): void

Defined in: spine/SpineController.ts:347

number

string

string

number

void


setPathConstraintMix(instanceId, name, mix): boolean

Defined in: spine/SpineController.ts:460

number

string

PathMixData

boolean


setSkeletonColor(instanceId, r, g, b, a): boolean

Defined in: spine/SpineController.ts:382

Whole-skeleton tint, multiplied into every vertex — backs SpineAnimation.color. Optional-chained: a spine wasm without this export (a realm still on an older module — the SDK can lead the wasm) degrades to a no-op instead of crashing.

number

number

number

number

number

boolean


setSkin(instanceId, skinName): void

Defined in: spine/SpineController.ts:155

number

string

void


setSlotColor(instanceId, slotName, r, g, b, a): boolean

Defined in: spine/SpineController.ts:375

number

string

number

number

number

number

boolean


setToSetupPose(instanceId): void

Defined in: spine/SpineController.ts:142

Back to where the skeleton’s data says it starts, every track cleared.

The one state a replay is reproducible from: play resets nothing, so a bone the next animation does not key keeps whatever the last pose left it at, and seeking twice to one time gives two poses.

number

void


setTrackAlpha(instanceId, track, alpha): void

Defined in: spine/SpineController.ts:351

number

number

number

void


setTransformConstraintMix(instanceId, name, mix): boolean

Defined in: spine/SpineController.ts:445

number

string

TransformMixData

boolean


skeletonBounds(skeletonHandle): SpineAABB | null

Defined in: spine/SpineController.ts:296

What the skeleton was AUTHORED at, in its own space — no instance, no pose, and never an authority over culling. See spineBounds.

number

SpineAABB | null


unloadSkeleton(handle): void

Defined in: spine/SpineController.ts:98

number

void


update(instanceId, dt): void

Defined in: spine/SpineController.ts:159

number

number

void