跳转到内容

SpineRuntime

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

Defined in: spine/SpineRuntime.ts:97

new SpineRuntime(version, module): SpineRuntime

Defined in: spine/SpineRuntime.ts:111

One runtime per loaded module: the ABI adapter is made here rather than handed in, because nothing else has a reason to hold one.

SpineVersion

SpineWasmModule

SpineRuntime

readonly version: SpineVersion

Defined in: spine/SpineRuntime.ts:111

get entityCount(): number

Defined in: spine/SpineRuntime.ts:115

number

clipBudget(entity): SpineClipBudget | null

Defined in: spine/SpineRuntime.ts:225

number

SpineClipBudget | null


collectAllEvents(): object[]

Defined in: spine/SpineRuntime.ts:327

object[]


dispose(): void

Defined in: spine/SpineRuntime.ts:657

Give back everything this runtime holds, in the order it holds it: instances, then the native skeletons, then the eras they came from.

void


enableEvents(entity): void

Defined in: spine/SpineRuntime.ts:322

number

void


ensurePose(entity): boolean

Defined in: spine/SpineRuntime.ts:509

Resolve this entity’s world transforms if they do not already reflect its local pose; returns whether it had to. The REVISION is the authority, not the frame — a frame that resolves and then moves an IK target owes another one, and a frame key would hand the next asker the pose from before it.

number

boolean


extractAndSubmitMeshes(core, registry, materialOf?): void

Defined in: spine/SpineRuntime.ts:574

NonNullable<EngineApi>

whichever engine core is present (see ecs/engineApi.ts) — the batches cross through its heap, which is wasm linear memory on the web and the host arena on a device.

CppRegistry

SkeletalMaterialOf

void


getAnimations(entity): string[]

Defined in: spine/SpineRuntime.ts:231

number

string[]


getBounds(entity): { height: number; width: number; x: number; y: number; } | null

Defined in: spine/SpineRuntime.ts:219

number

{ height: number; width: number; x: number; y: number; } | null


getPathConstraintMix(entity, name): PathMixData | null

Defined in: spine/SpineRuntime.ts:301

number

string

PathMixData | null


getSkins(entity): string[]

Defined in: spine/SpineRuntime.ts:237

number

string[]


getTransformConstraintMix(entity, name): TransformMixData | null

Defined in: spine/SpineRuntime.ts:288

number

string

TransformMixData | null


listConstraints(entity): ConstraintList | null

Defined in: spine/SpineRuntime.ts:282

number

ConstraintList | null


loadEntity(entity, era): boolean

Defined in: spine/SpineRuntime.ts:119

number

SpineEraBinding

boolean


mayDefer(entity): boolean

Defined in: spine/SpineRuntime.ts:375

Whether this entity’s world pose may be left owed when nothing wants it — both proofs, settled when its residency was made. The scheduler that will use it does not exist yet; a diagnostic asking why can already read the two facts off the residency.

number

boolean


metrics(): SpineFrameMetrics | null

Defined in: spine/SpineRuntime.ts:623

The LIVE frame record — the same object every frame, so reading it costs nothing and holding it shows the next frame. Null when not observing.

SpineFrameMetrics | null


observe(on): void

Defined in: spine/SpineRuntime.ts:617

Start or stop reporting what each frame costs. Off by default and off is free: every counter and both clock reads are behind this one field, so a runtime nobody is watching pays a branch per entity and nothing else.

boolean

void


observedBounds(entity, sampleStep?): SpineCullingEnvelope | null

Defined in: spine/SpineRuntime.ts:387

Scan this entity’s SKELETON — every animation over its whole duration, in every skin — on a scratch instance, so the entity asking keeps its pose. An OBSERVATION whatever it finds: authoring proposes contracts from it and the runtime may never act on it. See spineBounds.

number

number

SpineCullingEnvelope | null


openPreview(era): SpinePreviewInstance | null

Defined in: spine/SpineRuntime.ts:415

A skeleton posed by nobody but its caller.

Outside entities_ on purpose — the map updateAll and the submit both walk — so a preview is never advanced or drawn by the frame. What it gives back is the same instance and the same batch walk a scene entity gets.

SpineEraBinding

SpinePreviewInstance | null


poseEligibility(entity): { culling: SpineCullingEnvelope; requiresContinuousWorldPose: boolean; } | null

Defined in: spine/SpineRuntime.ts:396

Why, for a diagnostic: the promise, and what the runtime says of itself.

number

{ culling: SpineCullingEnvelope; requiresContinuousWorldPose: boolean; } | null


removeEntity(entity): void

Defined in: spine/SpineRuntime.ts:634

number

void


residencies(): SpineResidencyFacts[]

Defined in: spine/SpineRuntime.ts:475

Every residency this runtime holds, for a scene-level diagnostic.

SpineResidencyFacts[]


setAnimation(entity, animation, loop): void

Defined in: spine/SpineRuntime.ts:207

number

string

boolean

void


setAttachment(entity, slotName, attachmentName): boolean

Defined in: spine/SpineRuntime.ts:262

number

string

string

boolean


setDefaultMix(entity, duration): void

Defined in: spine/SpineRuntime.ts:247

number

number

void


setEnabled(entity, enabled): void

Defined in: spine/SpineRuntime.ts:314

number

boolean

void


setEntityProps(entity, props): void

Defined in: spine/SpineRuntime.ts:190

number

{ a: number; b: number; g: number; r: number; }

number

number

number

number

boolean

boolean

number

boolean

number

number

void


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

Defined in: spine/SpineRuntime.ts:269

number

string

number

number

number

boolean


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

Defined in: spine/SpineRuntime.ts:252

number

string

string

number

void


setPathConstraintMix(entity, name, mix): boolean

Defined in: spine/SpineRuntime.ts:307

number

string

PathMixData

boolean


setSkin(entity, skin): void

Defined in: spine/SpineRuntime.ts:212

number

string

void


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

Defined in: spine/SpineRuntime.ts:276

number

string

number

number

number

number

boolean


setTrackAlpha(entity, track, alpha): void

Defined in: spine/SpineRuntime.ts:257

number

number

number

void


setTransformConstraintMix(entity, name, mix): boolean

Defined in: spine/SpineRuntime.ts:294

number

string

TransformMixData

boolean


updateAll(dt): void

Defined in: spine/SpineRuntime.ts:532

number

void


windows(): object

Defined in: spine/SpineRuntime.ts:630

The last 120 COMPLETED frames of each timed phase — all three fed at the same boundary, so they always describe the same frames. A mean hides the frame that missed; these say whether one did.

object

pose: SpineTimeWindow

readback: SpineTimeWindow

total: SpineTimeWindow


worldPoseDebt(): number

Defined in: spine/SpineRuntime.ts:494

Entities owing a world pose, disabled ones aside — those are out of the frame, so posing every frame would not have resolved them either.

A STATE and not a tally, which is what makes it exact: read after a frame’s submit it is the world-transform resolves that frame did not do.

number