animator
Since 0.6
Use it in a scene entity's components list as { "type": "animator", … }. The contract writes the fields flat and refuses unknown keys.
Fields
| Field | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
asset | string | yes | |||
states | AnimState[] | yes | |||
initial | string | yes | |||
parameters | AnimParam[] | no | |||
events | AnimEvent[] | no | |||
ik | AnimIk[] | no | |||
pelvis | AnimPelvis | no | |||
lookAt | AnimLookAt | no | |||
retarget | AnimRetarget | no | |||
feet | string[] | no | The rig's feet, by joint name: the joints that plant on the ground, for the playtester's foot-slide check (GET /feel's feet). Absent, the engine picks the leaf joints nearest the ground contact in the bind pose. Two to four distinct, non-empty names (animator-feet-invalid); a name the rig does not have is reported on GET /feel. |
Rules that can refuse it
animator-blend-parametersanimator-damp-invalidanimator-event-invalidanimator-feet-invalidanimator-ik-unknownanimator-initial-undefinedanimator-invalidanimator-look-at-missinganimator-loop-range-invalidanimator-loop-seamanimator-not-finiteanimator-param-unknownanimator-play-unknownanimator-root-motion-sourceanimator-speed-invalidanimator-state-duplicateanimator-state-sourceanimator-stride-rateanimator-transition-undefinedanimator-unknowncharacter-unanimatedfeel/anim-bind-posefeel/anim-frozenfeel/anim-loop-seamfeel/anim-no-air-statefeel/anim-no-handlefeel/anim-popfeel/anim-run-in-placefeel/anim-slow-responsefeel/anim-stuckfeel/anim-unknown-namenull-handle
Example
From the contract's tested fixture fixtures/contract/full20/scene.json#worker.
{
"type": "animator",
"asset": "worker",
"initial": "idle",
"states": [
{
"name": "idle",
"clip": "Idle",
"loop": true,
"transitions": [
{
"to": "walk",
"on": "moving",
"blend": 0.2
}
]
},
{
"name": "walk",
"clip": "Walk",
"loop": true,
"transitions": [
{
"to": "idle",
"on": "idle",
"blend": 0.2
},
{
"to": "run",
"on": "sprint",
"blend": 0.15
}
]
},
{
"name": "run",
"clip": "Run",
"loop": true,
"transitions": [
{
"to": "walk",
"on": "moving",
"blend": 0.25
}
]
}
]
}