r3f-animation
Animate React Three Fiber objects with useFrame, damping, and GLTF clips. Use for procedural motion, animation transitions, or…
Choose and configure React Three Fiber surface materials, PBR, transparency, and transmission. Use for mesh appearance and material cost; use shader guidance for custom GLSL or TSL code.
$ npx -y skills add enzed/r3f-skills --skill r3f-materials --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/r3f-materialsContext preview
The summary Claude sees to decide when to auto-load this skill.
Choose and configure React Three Fiber surface materials, PBR, transparency, and transmission. Use for mesh appearance and material cost; use shader guidance for custom GLSL or TSL code.
name: r3f-materials description: Choose and configure React Three Fiber surface materials, PBR, transparency, and transmission. Use for mesh appearance and material cost; use shader guidance for custom GLSL or TSL code.
Inspect the installed renderer, Three.js, Fiber, and Drei versions first. Examples use Fiber 9 / React 19 with WebGL. Do not assume Drei shader-based materials work unchanged with WebGPU.
| Need | Starting point | Constraint | | --- | --- | --- | | Unlit artwork or UI surface | `meshBasicMaterial` | Still participates in output color/tone-mapping policy | | Ordinary PBR surface | `meshStandardMaterial` | Metals especially need an environment or suitable lights | | Clearcoat, transmission, sheen | `meshPhysicalMaterial` | Enable only needed features; more shader work | | Stylized lighting | `meshToonMaterial` | Needs lights; gradient maps need appropriate filtering | | Normal debugging | `meshNormalMaterial` | Useful for geometry/normal inspection | | Custom shading | ShaderMaterial or node material | Match WebGL/GLSL versus WebGPU/TSL |
Mount below Canvas. This small procedural environment avoids a remote preset dependency.
import { Environment, Lightformer } from '@react-three/drei'
export default function Example() {
return (
<>
<Environment resolution={64} frames={1}>
<Lightformer position={[0, 3, 2]} scale={[5, 5, 1]} intensity={3} />
</Environment>
<mesh>
<sphereGeometry args={[1, 32, 24]} />
<meshStandardMaterial color="goldenrod" metalness={1} roughness={0.3} />
</mesh>
</>
)
}Render under the intended lighting and output pipeline, then test transparent overlaps, shadows, and repeated mount/unmount. Compare GPU cost before adding transmission or reflection passes.
Focused guidance for building React Three Fiber scenes with current, compatible APIs. Each skill keeps decisions, pitfalls, and one checked example in SKILL.md; substantial optional recipes live in that skill's references/ directory.
Animate React Three Fiber objects with useFrame, damping, and GLTF clips. Use for procedural motion, animation transitions, or…
Set up React Three Fiber scenes, Canvas, typed JSX, hooks, and resource ownership. Use for scene architecture and render-loop…
Build React Three Fiber geometry, custom buffers, instanced meshes, points, and lines. Use for shape construction and geometry…
Implement React Three Fiber pointer events, picking, dragging, keyboard input, and camera controls. Use for scene interaction and…
Light React Three Fiber scenes with direct lights, environment maps, and shadows. Use for light placement, image-based lighting,…
Load and reuse 3D assets in React Three Fiber with useGLTF, useLoader, Suspense, and preloading. Use for model loading, decoder…