
R3f Animation
Frame-driven React Three Fiber animation covering damping, GLTF clips, timing, and on-demand rendering.
- skills.sh installs
- 2.3K
- GitHub stars
- 138
- last updated
- Aug 21, 2026
What it does
- Covers procedural motion with
useFrameand refs, plus authored GLTF clip playback through DreiuseAnimations - Includes a damping example that returns to idle, with guidance on clip cleanup and independent animated instances
- Enforces delta-based timing with
MathUtils.damp, and warns against fixed lerp fractions that overshoot at other frame rates - Designed for React 19 projects using Fiber 9 that animate meshes, use demand rendering, or hand collision-driven motion to Rapier
Install
$ npx -y skills add enzed/r3f-skills --skill r3f-animation -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
React Three Fiber animation
Check installed Fiber, Drei, and React versions first. These examples target Fiber 9 / React 19. Keep the project's animation library when it already meets the task.
Choose an owner
- Use
useFrameand refs for continuous transforms/uniforms; React state describes discrete goals such as selected, open, or active. - Use Drei
useAnimationsfor authored GLTF clips. Read clip playback for independent animated instances and cleanup. - Use the project's spring/tween library for coordinated transitions; check its React peer dependencies before adding it. Do not introduce a state manager merely to animate a mesh.
- Let Rapier own simulated body transforms. Animate kinematic targets through physics APIs rather than fighting the simulation with mesh positions.
Damping that can return to idle
Mount below Canvas; this also works with frameloop="demand". Click the box to change its target.
import { useEffect, useRef, useState } from 'react'
import { useFrame, useThree } from '@react-three/fiber'
import { MathUtils, type Mesh } from 'three'
Details
- Repository
- github.com/enzed/r3f-skills
- Categories
- Animation & Motion, Frontend & UI Code, Game Development
- First seen
- May 16, 2026
More from enzed/r3f-skills
All 11Similar to R3f Animation
More Animation & Motion
threejs-animationcloudai-x/threejs-skills27.3K installsComprehensive guide to three.js animation covering keyframe tracks, skeletal and morph-target playback, and clip blending.
framer-motiondylantarre/animation-principles1.8K installsReference guide that maps each of Disney's 12 animation principles to a Framer Motion React example.
web3d-integration-patternsfreshtechbro/claudedesignskills3.6K installsMeta-skill that combines Three.js, GSAP ScrollTrigger, React Three Fiber, Motion, and React Spring into one 3D architecture.
r3f-physicsenzed/r3f-skills2.1K installsReact Three Fiber physics with Rapier: rigid bodies, colliders, forces, sensors, joints, and character controllers.
r3f-shadersenzed/r3f-skills2.2K installsCustom GLSL and TSL materials for React Three Fiber, with uniform handling and vertex deformation guidance.
motion-framerfreshtechbro/claudedesignskills6.8K installsModern React animation library with gestures, layout animations, exit transitions, and spring physics for interactive UI.