MotionRegistry
Defined in: animation/motion.ts:184
The drivers one App knows. Per App and not global because a driver reaches live per-App state (the timeline’s player flags, spine’s manager), which a second App in the same process must not share.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new MotionRegistry():
MotionRegistry
Returns
Section titled “Returns”MotionRegistry
Methods
Section titled “Methods”context()
Section titled “context()”context(
world,entity,params):MotionContext
Defined in: animation/motion.ts:208
The context for driving entity this tick, REUSED across entities: the
alternative is an object and three closures per animated entity per frame.
A driver must not keep it — it describes only the call it was handed to.
Parameters
Section titled “Parameters”entity
Section titled “entity”number
params
Section titled “params”MotionParams
Returns
Section titled “Returns”driverFor()
Section titled “driverFor()”driverFor(
motion):MotionDriver<AnimatorMotion> |undefined
Defined in: animation/motion.ts:199
Parameters
Section titled “Parameters”motion
Section titled “motion”Returns
Section titled “Returns”MotionDriver<AnimatorMotion> | undefined
has(
kind):boolean
Defined in: animation/motion.ts:195
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”boolean
register()
Section titled “register()”register<
M>(kind,driver):void
Defined in: animation/motion.ts:187
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
unregister()
Section titled “unregister()”unregister(
kind):void
Defined in: animation/motion.ts:191
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”void