AnimatorControllerAPI
Defined in: animation/Animator.ts:500
Owns one App’s animator-controller registry and per-entity parameter/trigger
values, evaluates each Animator’s state machine, and drives the entity’s
SpriteAnimator clip on state changes. Published as the AnimatorController
resource; read it as app.getResource(AnimatorController).
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new AnimatorControllerAPI():
AnimatorControllerAPI
Defined in: animation/Animator.ts:508
Returns
Section titled “Returns”AnimatorControllerAPI
Methods
Section titled “Methods”clearControllers()
Section titled “clearControllers()”clearControllers():
void
Defined in: animation/Animator.ts:578
Returns
Section titled “Returns”void
getBool()
Section titled “getBool()”getBool(
entity,name):boolean
Defined in: animation/Animator.ts:604
Parameters
Section titled “Parameters”entity
Section titled “entity”number
string
Returns
Section titled “Returns”boolean
getController()
Section titled “getController()”getController(
name):AnimatorControllerDef|undefined
Defined in: animation/Animator.ts:570
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”AnimatorControllerDef | undefined
getFloat()
Section titled “getFloat()”getFloat(
entity,name):number
Defined in: animation/Animator.ts:600
Parameters
Section titled “Parameters”entity
Section titled “entity”number
string
Returns
Section titled “Returns”number
hasMotionDriver()
Section titled “hasMotionDriver()”hasMotionDriver(
kind):boolean
Defined in: animation/Animator.ts:529
Whether some driver can play kind here.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”boolean
registerController()
Section titled “registerController()”registerController(
name,def):void
Defined in: animation/Animator.ts:554
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”void
registerMotionDriver()
Section titled “registerMotionDriver()”registerMotionDriver<
M>(kind,driver):void
Defined in: animation/Animator.ts:522
Teach this animator a kind of motion. Called by the plugin that owns the kind (TimelinePlugin, SpinePlugin); a state naming an unregistered kind is inert rather than an error, since a scene may be authored against a module this build does not load.
Type Parameters
Section titled “Type Parameters”M extends AnimatorMotion
Parameters
Section titled “Parameters”M["kind"]
driver
Section titled “driver”MotionDriver<M>
Returns
Section titled “Returns”void
removeEntity()
Section titled “removeEntity()”removeEntity(
entity):void
Defined in: animation/Animator.ts:609
Drop an entity’s parameter/trigger/playback state (wire to world.onDespawn).
Parameters
Section titled “Parameters”entity
Section titled “entity”number
Returns
Section titled “Returns”void
resetTrigger()
Section titled “resetTrigger()”resetTrigger(
entity,name):void
Defined in: animation/Animator.ts:596
Parameters
Section titled “Parameters”entity
Section titled “entity”number
string
Returns
Section titled “Returns”void
setBool()
Section titled “setBool()”setBool(
entity,name,value):void
Defined in: animation/Animator.ts:588
Parameters
Section titled “Parameters”entity
Section titled “entity”number
string
boolean
Returns
Section titled “Returns”void
setFloat()
Section titled “setFloat()”setFloat(
entity,name,value):void
Defined in: animation/Animator.ts:584
Parameters
Section titled “Parameters”entity
Section titled “entity”number
string
number
Returns
Section titled “Returns”void
setSpineDriver()
Section titled “setSpineDriver()”setSpineDriver(
driver):void
Defined in: animation/Animator.ts:535
Inject the Spine driver (SpinePlugin wires SpineManager here). Optional — without it, spine-targeting states are inert.
Parameters
Section titled “Parameters”driver
Section titled “driver”SpineAnimationDriver | null
Returns
Section titled “Returns”void
setTrigger()
Section titled “setTrigger()”setTrigger(
entity,name):void
Defined in: animation/Animator.ts:592
Parameters
Section titled “Parameters”entity
Section titled “entity”number
string
Returns
Section titled “Returns”void
unregisterController()
Section titled “unregisterController()”unregisterController(
name):void
Defined in: animation/Animator.ts:558
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”void
update()
Section titled “update()”update(
world,dt?,events?):void
Defined in: animation/Animator.ts:635
dt seconds advance the animator’s own clock, which is what a sampled
motion is evaluated against and what a crossfade progresses on. events
is where what the clips declared is posted; without one the animator still
runs and simply says nothing, which is what a bare App is.
Parameters
Section titled “Parameters”number = 0
events?
Section titled “events?”Returns
Section titled “Returns”void