跳转到内容

SpineModuleController

此内容尚不支持你的语言。

Defined in: spine/SpineController.ts:50

new SpineModuleController(raw, api): SpineModuleController

Defined in: spine/SpineController.ts:55

SpineWasmModule

SpineWrappedAPI

SpineModuleController

get raw(): SpineWasmModule

Defined in: spine/SpineController.ts:65

SpineWasmModule

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

Defined in: spine/SpineController.ts:149

number

string

boolean = true

number = 0

number = 0

boolean


advanceAndApply(instanceId, dt): void

Defined in: spine/SpineController.ts:243

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:253

Seconds; negative where this skeleton has no such animation.

number

string

number


clipBudget(instanceId): SpineClipBudget | null

Defined in: spine/SpineController.ts:214

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:362

number

RawSpineEvent[]


createInstance(skeletonHandle): number

Defined in: spine/SpineController.ts:118

number

number


destroyInstance(instanceId): void

Defined in: spine/SpineController.ts:122

number

void


enableEvents(instanceId): void

Defined in: spine/SpineController.ts:358

number

void


forEachMeshBatch(instanceId, cb, probe?): void

Defined in: spine/SpineController.ts:303

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:166

number

string[]


getAtlasPageCount(handle): number

Defined in: spine/SpineController.ts:101

number

number


getAtlasPageTextureName(handle, pageIndex): string

Defined in: spine/SpineController.ts:105

number

number

string


getBonePosition(instanceId, boneName): Vec2 | null

Defined in: spine/SpineController.ts:186

number

string

Vec2 | null


getBoneRotation(instanceId, boneName): number

Defined in: spine/SpineController.ts:203

number

string

number


getBounds(instanceId): object

Defined in: spine/SpineController.ts:274

number

object

height: number

width: number

x: number

y: number


getLastError(): string

Defined in: spine/SpineController.ts:93

string


getPathConstraintMix(instanceId, name): PathMixData | null

Defined in: spine/SpineController.ts:417

number

string

PathMixData | null


getSkins(instanceId): string[]

Defined in: spine/SpineController.ts:176

number

string[]


getTransformConstraintMix(instanceId, name): TransformMixData | null

Defined in: spine/SpineController.ts:402

number

string

TransformMixData | null


listConstraints(instanceId): ConstraintList

Defined in: spine/SpineController.ts:393

number

ConstraintList


loadSkeleton(skelData, atlasText, isBinary): number

Defined in: spine/SpineController.ts:73

string | Uint8Array<ArrayBufferLike>

string

boolean

number


materializeWorldPose(instanceId, dt): void

Defined in: spine/SpineController.ts:248

The world transforms the local pose implies.

number

number

void


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

Defined in: spine/SpineController.ts:145

number

string

boolean = true

number = 0

boolean


requiresContinuousWorldPose(skeletonHandle): boolean

Defined in: spine/SpineController.ts:258

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:109

number

number

number

number

number

void


setAttachment(instanceId, slotName, attachmentName): boolean

Defined in: spine/SpineController.ts:327

number

string

string

boolean


setDefaultMix(skeletonHandle, duration): void

Defined in: spine/SpineController.ts:311

number

number

void


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

Defined in: spine/SpineController.ts:335

number

string

number

number

number

boolean


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

Defined in: spine/SpineController.ts:315

number

string

string

number

void


setPathConstraintMix(instanceId, name, mix): boolean

Defined in: spine/SpineController.ts:427

number

string

PathMixData

boolean


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

Defined in: spine/SpineController.ts:350

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:154

number

string

void


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

Defined in: spine/SpineController.ts:343

number

string

number

number

number

number

boolean


setToSetupPose(instanceId): void

Defined in: spine/SpineController.ts:141

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:319

number

number

number

void


setTransformConstraintMix(instanceId, name, mix): boolean

Defined in: spine/SpineController.ts:412

number

string

TransformMixData

boolean


skeletonBounds(skeletonHandle): SpineAABB | null

Defined in: spine/SpineController.ts:264

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:97

number

void


update(instanceId, dt): void

Defined in: spine/SpineController.ts:158

number

number

void