Talos docs

AnimState

Since 0.6
Plain text

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

MemberSignatureDescription
namename: string
clipclip?: stringExactly one of clip, blend and clips is set; the contract refuses two and none.
blendblend?: BlendTree
clipsclips?: string[]Several clips played one after another, each once.
orderorder?: "sequence" | "random"How clips follow each other. Default sequence.
looploop: boolean
rootMotionrootMotion?: boolean
rootYawrootYaw?: boolean
transitionstransitions: AnimTransition[]
onceonce?: AnimOncePresent on a one-shot: the clip plays once and the state hands over by itself.
speedspeed?: numberPlayback rate, a multiplier. Default 1.
speedParamspeedParam?: AnimSpeedParamTies the playback rate to a parameter: stride matching.
syncsync?: "phase" | "markers"Where the clip starts when the state is entered from another. Absent: its first frame.
inertialinertial?: booleanEnter by inertialization instead of a crossfade.
enterAtenterAt?: string[]Animation events a set of this state waits for.
loopStartloopStart?: numberWhere 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.
loopEndloopEnd?: numberWhere that loop ends and wraps back to loopStart, a fraction in 0..1. Default 1.