BjornMelin/dev-skills / plugins/web-motion/skills/web-three-r3f
web-three-r3f
VerifiedUse this skill for Three.js, React Three Fiber, Drei, Canvas/createRoot lifecycle, loaders, GLTF, useFrame, disposal, SSR/client boundaries, DPR, and browser proof. Trigger on Three.js, THREE, @react-three/fiber, @react-three/drei, R3F Canvas, useFrame, GLTF, WebGLRenderer. Do not use for near-miss tasks outside these boundaries; route to adjacent motion or platform skills when they own the implementation.
references/r3f-scene-lifecycle.md
View on GitHub# Canvas/createRoot and scene lifecycle
Skill: web-three-r3f
Checked at: 2026-06-04
## When To Load
- Read for Canvas props, custom root ownership, SSR/client boundaries, and resize.
## Operating Guidance
Three.js, React Three Fiber, Drei, Canvas/createRoot lifecycle, loaders, GLTF, useFrame, disposal, SSR/client boundaries, DPR, and browser proof.
### Decision Boundaries
- Use typegpu for typed WebGPU pipelines.
- Use expo-motion for Expo / React Native (Three.js / R3F on native).
- Use CSS 3D transforms only for simple DOM transforms.
### Workflow Details
1. Inspect Three/R3F/Drei/React versions and asset pipeline.
2. Choose Canvas/R3F or plain Three renderer based on local ownership.
3. Reserve stable layout, DPR, fallback, and reduced-motion behavior.
4. Verify nonblank pixels, resize, interaction, asset errors, and cleanup.
### Gotchas
- Undefined parent height causes blank canvases.
- React state inside useFrame causes frame-loop reconciliation.
- R3F auto-disposal does not cover every primitive or externally created object.
## Validation Notes
- Inspect installed package versions and local architecture before applying examples.
- Prefer the bundled `scripts/audit.mjs doctor --root <repo> --format json` command when setup is unclear.
- Use `scripts/audit.mjs scan --root <repo> --format markdown` for repeatable static findings, then manually verify every finding against current code.
- Close with repo-specific checks and user-visible runtime proof when this skill affects a rendered surface.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |