SpineRuntime
Defined in: spine/SpineRuntime.ts:97
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”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.
Parameters
Section titled “Parameters”version
Section titled “version”module
Section titled “module”SpineWasmModule
Returns
Section titled “Returns”SpineRuntime
Properties
Section titled “Properties”version
Section titled “version”
readonlyversion:SpineVersion
Defined in: spine/SpineRuntime.ts:111
Accessors
Section titled “Accessors”entityCount
Section titled “entityCount”Get Signature
Section titled “Get Signature”get entityCount():
number
Defined in: spine/SpineRuntime.ts:115
Returns
Section titled “Returns”number
Methods
Section titled “Methods”clipBudget()
Section titled “clipBudget()”clipBudget(
entity):SpineClipBudget|null
Defined in: spine/SpineRuntime.ts:225
Parameters
Section titled “Parameters”entity
Section titled “entity”number
Returns
Section titled “Returns”SpineClipBudget | null
collectAllEvents()
Section titled “collectAllEvents()”collectAllEvents():
object[]
Defined in: spine/SpineRuntime.ts:327
Returns
Section titled “Returns”object[]
dispose()
Section titled “dispose()”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.
Returns
Section titled “Returns”void
enableEvents()
Section titled “enableEvents()”enableEvents(
entity):void
Defined in: spine/SpineRuntime.ts:322
Parameters
Section titled “Parameters”entity
Section titled “entity”number
Returns
Section titled “Returns”void
ensurePose()
Section titled “ensurePose()”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.
Parameters
Section titled “Parameters”entity
Section titled “entity”number
Returns
Section titled “Returns”boolean
extractAndSubmitMeshes()
Section titled “extractAndSubmitMeshes()”extractAndSubmitMeshes(
core,registry,materialOf?):void
Defined in: spine/SpineRuntime.ts:574
Parameters
Section titled “Parameters”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.
registry
Section titled “registry”CppRegistry
materialOf?
Section titled “materialOf?”SkeletalMaterialOf
Returns
Section titled “Returns”void
getAnimations()
Section titled “getAnimations()”getAnimations(
entity):string[]
Defined in: spine/SpineRuntime.ts:231
Parameters
Section titled “Parameters”entity
Section titled “entity”number
Returns
Section titled “Returns”string[]
getBounds()
Section titled “getBounds()”getBounds(
entity): {height:number;width:number;x:number;y:number; } |null
Defined in: spine/SpineRuntime.ts:219
Parameters
Section titled “Parameters”entity
Section titled “entity”number
Returns
Section titled “Returns”{ height: number; width: number; x: number; y: number; } | null
getPathConstraintMix()
Section titled “getPathConstraintMix()”getPathConstraintMix(
entity,name):PathMixData|null
Defined in: spine/SpineRuntime.ts:301
Parameters
Section titled “Parameters”entity
Section titled “entity”number
string
Returns
Section titled “Returns”PathMixData | null
getSkins()
Section titled “getSkins()”getSkins(
entity):string[]
Defined in: spine/SpineRuntime.ts:237
Parameters
Section titled “Parameters”entity
Section titled “entity”number
Returns
Section titled “Returns”string[]
getTransformConstraintMix()
Section titled “getTransformConstraintMix()”getTransformConstraintMix(
entity,name):TransformMixData|null
Defined in: spine/SpineRuntime.ts:288
Parameters
Section titled “Parameters”entity
Section titled “entity”number
string
Returns
Section titled “Returns”TransformMixData | null
listConstraints()
Section titled “listConstraints()”listConstraints(
entity):ConstraintList|null
Defined in: spine/SpineRuntime.ts:282
Parameters
Section titled “Parameters”entity
Section titled “entity”number
Returns
Section titled “Returns”ConstraintList | null
loadEntity()
Section titled “loadEntity()”loadEntity(
entity,era):boolean
Defined in: spine/SpineRuntime.ts:119
Parameters
Section titled “Parameters”entity
Section titled “entity”number
SpineEraBinding
Returns
Section titled “Returns”boolean
mayDefer()
Section titled “mayDefer()”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.
Parameters
Section titled “Parameters”entity
Section titled “entity”number
Returns
Section titled “Returns”boolean
metrics()
Section titled “metrics()”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.
Returns
Section titled “Returns”SpineFrameMetrics | null
observe()
Section titled “observe()”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.
Parameters
Section titled “Parameters”boolean
Returns
Section titled “Returns”void
observedBounds()
Section titled “observedBounds()”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.
Parameters
Section titled “Parameters”entity
Section titled “entity”number
sampleStep?
Section titled “sampleStep?”number
Returns
Section titled “Returns”SpineCullingEnvelope | null
openPreview()
Section titled “openPreview()”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.
Parameters
Section titled “Parameters”SpineEraBinding
Returns
Section titled “Returns”SpinePreviewInstance | null
poseEligibility()
Section titled “poseEligibility()”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.
Parameters
Section titled “Parameters”entity
Section titled “entity”number
Returns
Section titled “Returns”{ culling: SpineCullingEnvelope; requiresContinuousWorldPose: boolean; } | null
removeEntity()
Section titled “removeEntity()”removeEntity(
entity):void
Defined in: spine/SpineRuntime.ts:634
Parameters
Section titled “Parameters”entity
Section titled “entity”number
Returns
Section titled “Returns”void
residencies()
Section titled “residencies()”residencies():
SpineResidencyFacts[]
Defined in: spine/SpineRuntime.ts:475
Every residency this runtime holds, for a scene-level diagnostic.
Returns
Section titled “Returns”setAnimation()
Section titled “setAnimation()”setAnimation(
entity,animation,loop):void
Defined in: spine/SpineRuntime.ts:207
Parameters
Section titled “Parameters”entity
Section titled “entity”number
animation
Section titled “animation”string
boolean
Returns
Section titled “Returns”void
setAttachment()
Section titled “setAttachment()”setAttachment(
entity,slotName,attachmentName):boolean
Defined in: spine/SpineRuntime.ts:262
Parameters
Section titled “Parameters”entity
Section titled “entity”number
slotName
Section titled “slotName”string
attachmentName
Section titled “attachmentName”string
Returns
Section titled “Returns”boolean
setDefaultMix()
Section titled “setDefaultMix()”setDefaultMix(
entity,duration):void
Defined in: spine/SpineRuntime.ts:247
Parameters
Section titled “Parameters”entity
Section titled “entity”number
duration
Section titled “duration”number
Returns
Section titled “Returns”void
setEnabled()
Section titled “setEnabled()”setEnabled(
entity,enabled):void
Defined in: spine/SpineRuntime.ts:314
Parameters
Section titled “Parameters”entity
Section titled “entity”number
enabled
Section titled “enabled”boolean
Returns
Section titled “Returns”void
setEntityProps()
Section titled “setEntityProps()”setEntityProps(
entity,props):void
Defined in: spine/SpineRuntime.ts:190
Parameters
Section titled “Parameters”entity
Section titled “entity”number
color?
Section titled “color?”{ a: number; b: number; g: number; r: number; }
color.a
Section titled “color.a”number
color.b
Section titled “color.b”number
color.g
Section titled “color.g”number
color.r
Section titled “color.r”number
flipX?
Section titled “flipX?”boolean
flipY?
Section titled “flipY?”boolean
layer?
Section titled “layer?”number
playing?
Section titled “playing?”boolean
skeletonScale?
Section titled “skeletonScale?”number
timeScale?
Section titled “timeScale?”number
Returns
Section titled “Returns”void
setIKTarget()
Section titled “setIKTarget()”setIKTarget(
entity,constraintName,targetX,targetY,mix):boolean
Defined in: spine/SpineRuntime.ts:269
Parameters
Section titled “Parameters”entity
Section titled “entity”number
constraintName
Section titled “constraintName”string
targetX
Section titled “targetX”number
targetY
Section titled “targetY”number
number
Returns
Section titled “Returns”boolean
setMixDuration()
Section titled “setMixDuration()”setMixDuration(
entity,fromAnim,toAnim,duration):void
Defined in: spine/SpineRuntime.ts:252
Parameters
Section titled “Parameters”entity
Section titled “entity”number
fromAnim
Section titled “fromAnim”string
toAnim
Section titled “toAnim”string
duration
Section titled “duration”number
Returns
Section titled “Returns”void
setPathConstraintMix()
Section titled “setPathConstraintMix()”setPathConstraintMix(
entity,name,mix):boolean
Defined in: spine/SpineRuntime.ts:307
Parameters
Section titled “Parameters”entity
Section titled “entity”number
string
Returns
Section titled “Returns”boolean
setSkin()
Section titled “setSkin()”setSkin(
entity,skin):void
Defined in: spine/SpineRuntime.ts:212
Parameters
Section titled “Parameters”entity
Section titled “entity”number
string
Returns
Section titled “Returns”void
setSlotColor()
Section titled “setSlotColor()”setSlotColor(
entity,slotName,r,g,b,a):boolean
Defined in: spine/SpineRuntime.ts:276
Parameters
Section titled “Parameters”entity
Section titled “entity”number
slotName
Section titled “slotName”string
number
number
number
number
Returns
Section titled “Returns”boolean
setTrackAlpha()
Section titled “setTrackAlpha()”setTrackAlpha(
entity,track,alpha):void
Defined in: spine/SpineRuntime.ts:257
Parameters
Section titled “Parameters”entity
Section titled “entity”number
number
number
Returns
Section titled “Returns”void
setTransformConstraintMix()
Section titled “setTransformConstraintMix()”setTransformConstraintMix(
entity,name,mix):boolean
Defined in: spine/SpineRuntime.ts:294
Parameters
Section titled “Parameters”entity
Section titled “entity”number
string
Returns
Section titled “Returns”boolean
updateAll()
Section titled “updateAll()”updateAll(
dt):void
Defined in: spine/SpineRuntime.ts:532
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”void
windows()
Section titled “windows()”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.
Returns
Section titled “Returns”object
pose:
SpineTimeWindow
readback
Section titled “readback”readback:
SpineTimeWindow
total:
SpineTimeWindow
worldPoseDebt()
Section titled “worldPoseDebt()”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.
Returns
Section titled “Returns”number