AnimState
Since 0.6
Signature
export interface AnimState {
name: string
/** Exactly one of `clip`, `blend` and `clips` is set; the contract refuses two and none. */
clip?: string
blend?: BlendTree
/** Several clips played one after another, each once. */
clips?: string[]
/** How `clips` follow each other. Default `sequence`. */
order?: "sequence" | "random"
loop: boolean
rootMotion?: boolean
rootYaw?: boolean
transitions: AnimTransition[]
/** Present on a one-shot: the clip plays once and the state hands over by itself. */
once?: AnimOnce
/** Playback rate, a multiplier. Default 1. */
speed?: number
/** Ties the playback rate to a parameter: stride matching. */
speedParam?: AnimSpeedParam
/** Where the clip starts when the state is entered from another. Absent: its first frame. */
sync?: "phase" | "markers"
/** Enter by inertialization instead of a crossfade. */
inertial?: boolean
/** Animation events a `set` of this state waits for. */
enterAt?: string[]
/** Where the loop of this state's `clip` begins, a fraction of the clip in 0..1: it plays from 0 once, then loops the range. Default 0. */
loopStart?: number
/** Where that loop ends and wraps back to `loopStart`, a fraction in 0..1. Default 1. */
loopEnd?: number
}
Import: import type { AnimState } from "@argus/gameplay"
Members
| Member | Signature | Description |
|---|---|---|
name | name: string | |
clip | clip?: string | Exactly one of clip, blend and clips is set; the contract refuses two and none. |
blend | blend?: BlendTree | |
clips | clips?: string[] | Several clips played one after another, each once. |
order | order?: "sequence" | "random" | How clips follow each other. Default sequence. |
loop | loop: boolean | |
rootMotion | rootMotion?: boolean | |
rootYaw | rootYaw?: boolean | |
transitions | transitions: AnimTransition[] | |
once | once?: AnimOnce | Present on a one-shot: the clip plays once and the state hands over by itself. |
speed | speed?: number | Playback rate, a multiplier. Default 1. |
speedParam | speedParam?: AnimSpeedParam | Ties the playback rate to a parameter: stride matching. |
sync | sync?: "phase" | "markers" | Where the clip starts when the state is entered from another. Absent: its first frame. |
inertial | inertial?: boolean | Enter by inertialization instead of a crossfade. |
enterAt | enterAt?: string[] | Animation events a set of this state waits for. |
loopStart | loopStart?: number | Where the loop of this state's clip begins, a fraction of the clip in 0..1: it plays from 0 once, then loops the range. Default 0. |
loopEnd | loopEnd?: number | Where that loop ends and wraps back to loopStart, a fraction in 0..1. Default 1. |