r3f-animation
Animate React Three Fiber objects with useFrame, damping, and GLTF clips. Use for procedural motion, animation transitions, or…
Configure textures in React Three Fiber, including color spaces, UV channels, sampling, video, and render targets. Use for texture appearance or memory issues; use loader guidance for model-loading workflows.
$ npx -y skills add enzed/r3f-skills --skill r3f-textures --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/r3f-texturesContext preview
The summary Claude sees to decide when to auto-load this skill.
Configure textures in React Three Fiber, including color spaces, UV channels, sampling, video, and render targets. Use for texture appearance or memory issues; use loader guidance for model-loading workflows.
name: r3f-textures description: Configure textures in React Three Fiber, including color spaces, UV channels, sampling, video, and render targets. Use for texture appearance or memory issues; use loader guidance for model-loading workflows.
Inspect installed Three.js, Fiber, Drei, and renderer versions first. Examples target Fiber 9 / React 19 and Three.js r185 with WebGL. Preserve correctly configured assets rather than resetting every texture.
| Texture content | Color-space annotation | | --- | --- | | PNG/JPEG base color or emissive color | `SRGBColorSpace` | | Roughness, metalness, normal, AO, alpha/masks | `NoColorSpace` | | Linear HDR/EXR lighting data | Preserve loader-provided linear metadata |
`NoColorSpace` is not another name for `LinearSRGBColorSpace`: scalar/vector data has no color space. Do not blanket-convert every map to sRGB.
Mount under Suspense inside Canvas. The file path is an application asset, not a file provided by this skill.
import { useTexture } from '@react-three/drei'
import { SRGBColorSpace } from 'three'
export default function Example() {
const map = useTexture('/textures/checker.png', (texture) => {
// This URL is consistently used as a color texture by all consumers.
texture.colorSpace = SRGBColorSpace
texture.needsUpdate = true
})
return (
<mesh>
<planeGeometry args={[3, 3]} />
<meshStandardMaterial map={map} roughness={1} />
</mesh>
)
}Fiber handles common built-in color map props, and glTF loaders set texture metadata. Explicit annotation is especially important for custom shader uniforms or manually created textures.
Test a known color swatch, data maps under changing lights, texture orientation, repeated mounts, and two consumers with different UV transforms. Inspect GPU texture counts; they are counts, not byte-accurate memory measurements.
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…