# Bevy Animation

Bevy ECS skill for animation playback.

- Repository: https://github.com/thedivergentai/Game-Dev-Agentic-Skills (917 stars)
- Category: Design
- License: LGPL-3.0
- Last updated: 2026-10-16
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill bevy-animation -g -a claude-code -y`
Codex: `npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill bevy-animation -g -a codex -y`
Cursor: `npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill bevy-animation -g -a cursor -y`
Gemini CLI: `npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill bevy-animation -g -a gemini-cli -y`

## Description

Bevy ECS skill for animation playback. Keywords: Bevy, AnimationPlayer, AnimationClip, AnimationPlugin, animate_targets.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Bevy animation playback

## When to use

Load this when an entity should play an AnimationClip. Blend graphs belong on bevy-animation-graph. 2D sprite specifics belong on bevy-2d-animation.

## ECS shape

- **Components:** `AnimationPlayer` controls playback. `AnimatedBy` links a target entity to the player entity. `AnimationTargetId` selects which curves apply.
- **Assets:** `AnimationClip` holds `VariableCurve` entries.
- **Systems:** `advance_animations` advances time. `animate_targets` writes the curves. `AnimationPlugin` adds animation support.
- **Events:** `AnimationEvent` can be triggered from a clip. Check the animation docs for observer wiring beyond the trait name.

## Playback pieces

| Need | Bevy idiom |
| --- | --- |
| Who advances time | `AnimationPlayer` on an entity |
| Clip asset | `AnimationClip` inside an `AnimationGraph` node |
| Which bone or field | `AnimationTargetId` plus `AnimatedBy` |
| Repeat | `ActiveAnimation::repeat`, which sets `RepeatAnimation::Forever` |

## Examples

```toml
[dependencies]
bevy = "0.20"
```

`AnimationPlayer::play` takes an `AnimationNodeIndex` from an `AnimationGraph`, not a clip handle. `AnimationGraph::from_clip` builds that one-node graph. `AnimatedBy` points the target at the player entity. `AnimationTargetId::from_name` selects the curves for that name.

```rust
use bevy::animation::{AnimatedBy, AnimationTargetId};

#[derive(Resource)]
struct WalkNode(AnimationNodeIndex);

The rest: https://github.com/thedivergentai/Game-Dev-Agentic-Skills/blob/HEAD/skills/bevy-animation/SKILL.md
