# AnimLayer

> Talos 0.7 · Since 0.7

A second playback over the base animator's, on some of the bones.

See `AnimLayer` in the contract.

## Signature

```ts
export interface AnimLayer {
  /** How a script names the layer; unique in the animator. */
  name: string
  /** The bones it acts on, each with its descendants. Absent: all of them. */
  mask?: string[]
  /** Bones, with their descendants, taken back out of `mask`. */
  maskExclude?: string[]
  /** A weight 0..1 for a bone and its descendants within the mask. */
  maskWeights?: Record<string, number>
  /** True: add the clip's change from its reference pose on top of the pose below, instead of replacing it. */
  additive?: boolean
  /** How strongly the layer applies, 0..1, default 1; see `ctx.animator.layerWeight`. */
  weight?: number
  /** A float parameter that drives the weight each tick instead of `weight`. */
  weightParam?: string
  /** Seconds the layer takes to fade in when something starts playing on it. */
  blendIn?: number
  /** Seconds the layer takes to fade out when its playback ends or is stopped. */
  blendOut?: number
  /** Additive only: the clip whose pose is the reference, and where in it (0..1, default 0). */
  reference?: string
  /** Where in the reference clip the reference pose is, 0..1, default 0. */
  referenceAt?: number
  /** A state the layer plays from the start, held while nothing else plays on it. Absent: empty until a script plays something on it. */
  initial?: string
}
```

Import: `import type { AnimLayer } from "@argus/gameplay"`

## Members

| Member | Signature | Description |
|---|---|---|
| `name` | `name: string` | How a script names the layer; unique in the animator. |
| `mask` | `mask?: string[]` | The bones it acts on, each with its descendants. Absent: all of them. |
| `maskExclude` | `maskExclude?: string[]` | Bones, with their descendants, taken back out of `mask`. |
| `maskWeights` | `maskWeights?: Record<string, number>` | A weight 0..1 for a bone and its descendants within the mask. |
| `additive` | `additive?: boolean` | True: add the clip's change from its reference pose on top of the pose below, instead of replacing it. |
| `weight` | `weight?: number` | How strongly the layer applies, 0..1, default 1; see `ctx.animator.layerWeight`. |
| `weightParam` | `weightParam?: string` | A float parameter that drives the weight each tick instead of `weight`. |
| `blendIn` | `blendIn?: number` | Seconds the layer takes to fade in when something starts playing on it. |
| `blendOut` | `blendOut?: number` | Seconds the layer takes to fade out when its playback ends or is stopped. |
| `reference` | `reference?: string` | Additive only: the clip whose pose is the reference, and where in it (0..1, default 0). |
| `referenceAt` | `referenceAt?: number` | Where in the reference clip the reference pose is, 0..1, default 0. |
| `initial` | `initial?: string` | A state the layer plays from the start, held while nothing else plays on it. Absent: empty until a script plays something on it. |
