# AnimIk

> Talos next · Since 0.6

One two-bone IK chain: a leg or an arm, solved so its end bone sits on a point.

## Signature

```ts
export interface AnimIk {
  name: string
  /** Root, middle and end bone: a parent → child → grandchild path of the rig. */
  chain: [string, string, string]
  /** Which way the chain bends, as a direction in the rig's own frame. */
  pole?: Vec3
  /** A bone whose position pulls the middle joint towards it. At most one of the two. */
  poleBone?: string
  weight: number
  target?: Vec3
  /**
   * Degrees the middle joint is held bent to when the rig rests straighter than that, so an
   * imported straight-legged humanoid still has downward travel. Absent is the canonical
   * 40°; `0` turns it off. `pelvis` pays for the height the bend costs.
   */
  restBend?: number
}
```

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

## Members

| Member | Signature | Description |
|---|---|---|
| `name` | `name: string` |  |
| `chain` | `chain: [string, string, string]` | Root, middle and end bone: a parent → child → grandchild path of the rig. |
| `pole` | `pole?: Vec3` | Which way the chain bends, as a direction in the rig's own frame. |
| `poleBone` | `poleBone?: string` | A bone whose position pulls the middle joint towards it. At most one of the two. |
| `weight` | `weight: number` |  |
| `target` | `target?: Vec3` |  |
| `restBend` | `restBend?: number` | Degrees the middle joint is held bent to when the rig rests straighter than that, so an imported straight-legged humanoid still has downward travel. Absent is the canonical 40°; `0` turns it off. `pelvis` pays for the height the bend costs. |
