# r3f-animation

Skill for smooth animation of 3D objects in React Three Fiber using useFrame, damping, and GLTF clips. Useful for procedural motion, state transitions, and on-demand animation control.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 2000 installs · ★ 130
- Author: EnzeD
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/EnzeD/r3f-skills/tree/HEAD/skills/r3f-animation/SKILL.md
- Updated: 2026-08-31
- HTML: https://affpapa.org/en/nevibecode/skills/r3f-animation

## What it does

The skill provides ready-made patterns for animating 3D scenes: damping that returns to rest, synchronization with Rapier physics, playback of authored GLTF clips via Drei. An example with `useFrame` and `MathUtils.damp` shows how to smoothly interpolate object position between target values, driven by React state (active, open) independent of frame rate.

The skill clarifies key decisions: when to use `useFrame` for continuous transforms, when to reach for Drei `useAnimations` for baked clips, when to hand control to Rapier for physics-driven motion. It covers performance pitfalls: proper use of delta time in velocity integration, vector and quaternion reuse, explicit pause for expensive animation, and respect for reduced-motion preferences.

Requires Fiber 9, Drei, and React 19 or compatible versions. If your project already has a spring library or animation system, the skill suggests checking peer dependencies before adding new tools and avoiding a state manager solely for mesh animation.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add EnzeD/r3f-skills --skill r3f-animation -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/r3f-animation/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/r3f-animation/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add EnzeD/r3f-skills --skill r3f-animation -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/r3f-animation/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add EnzeD/r3f-skills --skill r3f-animation -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/r3f-animation/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install EnzeD/r3f-skills r3f-animation
```

2. **Manually: put the files in place**
- File: `.github/skills/r3f-animation/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add EnzeD/r3f-skills --skill r3f-animation -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/EnzeD/r3f-skills --path skills/r3f-animation
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/r3f-animation/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add EnzeD/r3f-skills --skill r3f-animation -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/EnzeD/r3f-skills/tree/HEAD/skills/r3f-animation/SKILL.md

## When to use it
- Smoothly move an object between two states without jumps or overshooting
- Play back stored GLTF animations for multiple instances of the same model
- Synchronize mesh movement with the Rapier physics engine instead of fighting the simulation
- Optimize animation: avoid vector allocation every frame, handle varying refresh rates correctly
- Stop expensive animations when an object is hidden or the window loses focus

## Example prompts
- Add damping animation so the object transitions smoothly along the X axis when state changes
- Set up GLTF clip playback for two model instances running different actions independently
- Help sync animation motion with Rapier physics instead of directly changing position

## Similar
- [frontend-design](https://affpapa.org/en/nevibecode/skills/frontend-design.md) — skill · 1025790 installs
- [design-taste-frontend](https://affpapa.org/en/nevibecode/skills/design-taste-frontend.md) — skill · 678700 installs
- [prototype](https://affpapa.org/en/nevibecode/skills/prototype.md) — skill · 986201 installs
- [hyperframes](https://affpapa.org/en/nevibecode/skills/heygen-com-hyperframes.md) — skill · 1200000 installs
- [hyperframes-cli](https://affpapa.org/en/nevibecode/skills/heygen-com-hyperframes-cli.md) — skill · 1300000 installs
- [webapp-testing](https://affpapa.org/en/nevibecode/skills/webapp-testing.md) — skill · 186758 installs

From the same set: [enzed/r3f-skills](https://affpapa.org/en/nevibecode/by/enzed/r3f-skills.md) — 9 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
