> For the complete documentation index, see [llms.txt](https://docs.aethercube.fr/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.aethercube.fr/developers/content-packs/animations.md). Agents can also search and read this documentation through its [MCP server](https://docs.aethercube.fr/~gitbook/mcp).

# Animations

This page shows how to animate your models. A pack can give a model keyframe clips, and a clip replaces the built-in pose of a state for the nodes it has tracks for. Nothing else changes, so you can animate just a tail or just a lantern.

## The table

`data/animations.json` maps a model to its states, and each state to a clip file:

```json
{
  "version": 1,
  "models": {
    "skyglass:keel_drifter": {
      "idle": "animations/drifter_idle.json",
      "walk": "animations/drifter_drift.json",
      "fly": "animations/drifter_drift.json",
      "hit": "animations/drifter_hit.json",
      "death": "animations/drifter_death.json"
    }
  }
}
```

States: `idle`, `walk`, `run`, `jump`, `fall`, `land`, `attack`, `hit`, `death`, `cast`, `interact`, `swim`, `fly`.

## A clip

```json
{
  "format": 1,
  "duration": 1.2,
  "loop": true,
  "tracks": {
    "left_leg": [
      { "t": 0.0, "rotate": [ 30, 0, 0] },
      { "t": 0.6, "rotate": [-30, 0, 0] },
      { "t": 1.2, "rotate": [ 30, 0, 0] }
    ],
    "body": [
      { "t": 0.0, "move": [0, 0.05, 0] },
      { "t": 0.6, "move": [0, 0, 0] }
    ]
  }
}
```

| Field      | Meaning                                                                              |
| ---------- | ------------------------------------------------------------------------------------ |
| `format`   | `1`.                                                                                 |
| `duration` | Length in seconds, 0.05 to 60.                                                       |
| `loop`     | Whether the clip repeats.                                                            |
| `tracks`   | Node name to a list of keys. A track is named after a node of the model.             |
| `t`        | Time of a key in seconds. Keys are sorted by `t`, from 0 to `duration`.              |
| `rotate`   | `[x, y, z]` in degrees, applied Y, then X, then Z, relative to the node's rest pose. |
| `move`     | `[x, y, z]` offset in blocks.                                                        |

Limits: at most 64 tracks per clip and 256 keys per track.

Between keys the client slerps rotations and lerps offsets. A node with no track stays as the state's own pose would place it.

## Timing

| State                        | How the clip plays                                                                         |
| ---------------------------- | ------------------------------------------------------------------------------------------ |
| `walk`, `run`, `swim`, `fly` | It follows the stride (the gait phase).                                                    |
| `idle`, `jump`, `fall`       | It loops in time. `jump` is the airborne part of a jump, not its take-off.                 |
| The others                   | It plays once over the length of the action. `attack` also plays for every hit of a combo. |

## Fallback

A clip replaces the built-in pose of its state only for the nodes it has tracks for. The other nodes keep the built-in pose. A state with no clip keeps the built-in animation of the model's rig. A `prop` has no built-in animation. Clips blend in and out like built-in states.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.aethercube.fr/developers/content-packs/animations.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
