react-three-fiber
Skill0 starsChanged 7 days agoMITView on GitHub
Build 3D scenes in React with React Three Fiber (@react-three/fiber), the React renderer for three.js. Use when the user wants 3D in a React or Next.js app, a Canvas with meshes, lights and cameras, animation with useFrame, loading models or textures, pointer events on 3D objects, on-demand rendering and performance work, a v8 to v9 migration, or to fix a React Three Fiber problem such as setState in a render loop or a Next.js server-component error.
12 other projects use a version of this.
Adopted by
Most recently taken up by
- Chrisxtain/claude-skillstheir own version, first seen Nov 15, 2026
- RuneStone-Tech/optimize-anythingtheir own version, first seen Nov 8, 2026
- vercel-labs/json-rendertheir own version, first seen Oct 29, 2026
- Eliart-tech/Claude-skillstheir own version, first seen Oct 25, 2026
- Samueladewole/claude-skillstheir own version, first seen Oct 13, 2026
- xenodeve/xeno-skillstheir own version, first seen Oct 12, 2026
Used with
Projects with it also use locomotive-scroll, threejs-webgl and 1 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
freshtechbroSkilllocomotive-scroll
Comprehensive skill for Locomotive Scroll smooth scrolling library with parallax effects, viewport detection, and scroll-driven animations. Use this skill when implementing smooth scrolling experiences, creating parallax effects, building scroll-triggered animations, or developing immersive scrolling websites. Triggers on tasks involving Locomotive Scroll, smooth scrolling, parallax, scroll detection, scroll events, sticky elements, horizontal scrolling, or GSAP ScrollTrigger integration. Integrates with GSAP for advanced scroll-driven animations.
Also in 3 projects that use this
freshtechbroSkillthreejs-webgl
Comprehensive skill for Three.js 3D web development. Use this skill when building interactive 3D scenes, WebGL/WebGPU applications, product configurators, 3D visualizations, or immersive web experiences. Triggers on tasks involving Three.js, 3D rendering, scenes, cameras, meshes, materials, lights, animations, textures, or WebGL/WebGPU rendering.
Also in 3 projects that use this
- +1 more from freshtechbro
Other versions12 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 12
- vercel-labs/json-render★ 20ksame name
- CristianOlivera1/openvid★ 2.8ksame name
- freshtechbro/claudedesignskills★ 824same name
- xenodeve/xeno-skills★ 2same name
- RuneStone-Tech/optimize-anything★ 1same name
- SkotAlexsander/skills★ 1same name
- Chrisxtain/claude-skills★ 0same name
- Eliart-tech/Claude-skills★ 0same name
- kschiavo-beep/claude-skills★ 0same name
- lklyne/skills★ 0same name
2 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repositoryOne other file it gives its agents.
- CLAUDE.mdCLAUDE.md
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 1 is distinctive, and 1 is very specific to this project.
0
Common
Most of the 12 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 42
Read the file for the task above before writing code, and use the API shown there.
- Very specific: line 43
Start from the smallest Canvas that works, check it renders, then add objects, lights and motion.
“Common” is measured: kept by at least 6 in 10 of the 12 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
React Three Fiber
React Three Fiber (R3F) renders three.js with React: three.js objects are written as JSX, and hooks give access to the render loop and the scene. The project's own docs are bundled in reference/. Read the file that matches the task instead of all of them.
| Task | Read |
| What it is, a first scene | reference/introduction.md |
| Install for Vite, Next.js, React Native or a CDN | reference/installation.md |
Canvas props: frameloop, dpr, shadows, camera, gl | reference/canvas.md |
useFrame, useThree, useLoader, useGraph | reference/hooks.md |
JSX objects, constructor args, attach, props, dispose | reference/objects.md |
Pointer events, onClick, onPointerOver, event propagation | reference/events.md |
Animation with useFrame and springs | reference/basic-animations.md |
| Loading glTF models and textures | reference/loading-models.md, reference/loading-textures.md |
| Why it is fast, how objects map to JSX | reference/how-it-works.md |
| Common mistakes | reference/pitfalls.md |
| Frame rate, instancing, on-demand rendering, level of detail | reference/scaling-performance.md |
| TypeScript types and JSX typing | reference/typescript.md |
| Upgrading from v8 | reference/v9-migration-guide.md |
| Testing | reference/testing.md |
The rules that prevent most problems
These come from the bundled docs; the details and examples are in reference/pitfalls.md and reference/scaling-performance.md.
- Install
threeand@react-three/fiber. R3F must pair with the matching major version of React, like react-dom does: check the version note inreference/installation.mdbefore choosing versions. - Do not call
setStateinuseFrameor in fast events. Mutate refs and use the framedeltainstead, so the animation does not depend on the frame rate. - Do not create objects in a loop. Allocate vectors, colours and materials once and reuse them.
- Load assets with
useLoader, which caches and suspends, rather than calling a loader in render. - Reuse geometries and materials, and use instancing for many copies of the same mesh.
- Render on demand (
frameloop="demand") when nothing animates all the time, and callinvalidate()to draw a frame. - Mount with care. Toggling
visibleis cheaper than mounting and unmounting a heavy component. - In Next.js, add
threetotranspilePackagesinnext.config.js(seereference/installation.md). R3F components use hooks and browser APIs, so keep them in a client component ("use client").
Working method
- Read the file for the task above before writing code, and use the API shown there. R3F changes between major versions.
- Start from the smallest
Canvasthat works, check it renders, then add objects, lights and motion. - For performance problems, measure first (the performance monitoring section in
reference/scaling-performance.md), then apply the matching technique.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

