r3f-animation
Animate React Three Fiber objects with useFrame, damping, and GLTF clips. Use for procedural motion, animation transitions, or…
Configure React Three Fiber postprocessing, bloom, selection effects, ambient occlusion, and depth of field. Use for composer pipelines and screen-space effects, rather than mesh material shaders.
$ npx -y skills add enzed/r3f-skills --skill r3f-postprocessing --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/r3f-postprocessingContext preview
The summary Claude sees to decide when to auto-load this skill.
Configure React Three Fiber postprocessing, bloom, selection effects, ambient occlusion, and depth of field. Use for composer pipelines and screen-space effects, rather than mesh material shaders.
name: r3f-postprocessing description: Configure React Three Fiber postprocessing, bloom, selection effects, ambient occlusion, and depth of field. Use for composer pipelines and screen-space effects, rather than mesh material shaders.
Check the actual renderer and package peer dependencies first. This example targets Fiber 9.7 / React 19 with `@react-three/postprocessing` 3.1 and `postprocessing` 6.39 on WebGL. Do not combine arbitrary newest package versions or silently upgrade a project.
Mount beneath Canvas. Click the left box to toggle selection. Both boxes are bright, but only the selected object contributes to this bloom pass.
import { useMemo, useRef, useState } from 'react'
import { EffectComposer, Select, Selection, SelectiveBloom, ToneMapping } from '@react-three/postprocessing'
import { ToneMappingMode } from 'postprocessing'
import type { DirectionalLight } from 'three'
export default function Example() {
const light = useRef<DirectionalLight>(null)
const lights = useMemo(() => [light], [])
const [selected, setSelected] = useState(true)
return (
<Selection>
<directionalLight ref={light} position={[0, 3, 5]} intensity={2} />
<Select enabled={selected}>
<mesh name="bloom-selected" position={[-1.2, 0, 0]} onClick={() => setSelected((value) => !value)}>
<boxGeometry args={[0.7, 0.7, 0.7]} />
<meshStandardMaterial color="black" emissive="white" emissiveIntensity={3} />
</mesh>
</Select>
<mesh name="bloom-control" position={[1.2, 0, 0]}>
<boxGeometry args={[0.7, 0.7, 0.7]} />
<meshStandardMaterial color="black" emissive="white" emissiveIntensity={3} />
</mesh>
<EffectComposer multisampling={0}>
<SelectiveBloom lights={lights} luminanceThreshold={0} intensity={2} mipmapBlur />
<ToneMapping mode={ToneMappingMode.ACES_FILMIC} />
</EffectComposer>
</Selection>
)
}Render the full pipeline, toggle effects/selection, resize, and unmount/remount under Strict Mode. Confirm selected-only behavior and final color output; TypeScript cannot prove either.
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…