Skip to content

BjornMelin/dev-skills / plugins/web-motion/skills/web-three-r3f

web-three-r3f

Verified

Use 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/docs-drei-gltf-use-gltf.md

View on GitHub
# Drei useGLTF Source Notes

Source: https://drei.docs.pmnd.rs/loaders/gltf-use-gltf

Checked: 2026-06-04.

Use this file when the task involves GLTF loading, decoder paths, preloading,
cache clearing, generated model components, or asset-pipeline boundaries.

## Loader Boundary

- Prefer `useGLTF` for GLTF/GLB assets in R3F apps that already use Drei.
  Prefer `useLoader(GLTFLoader, url)` when the repo avoids Drei or needs a
  lower-level loader boundary.
- Keep decoder and extension configuration at the loader hook boundary:
  Draco path/config, MeshOpt decoder, and `extendLoader` customizations belong
  with the model-loading owner, not inside render-time object construction.
- Suspense should own the loading UI for route/scene assets. Use Drei
  `useProgress` or app-level loading state only when the product needs progress
  details.

## Cache And Preload

- `useGLTF.preload(url)` is useful when the route is about to need the model.
  Do not preload every model globally without route-level value.
- `useGLTF.clear(url)` should be scoped to obsolete URLs owned by the current
  route/scene. Avoid clearing shared cached assets while another scene may
  still reference them.
- Generated GLTFJSX components commonly include `dispose={null}` to prevent
  recursive disposal of shared generated assets. Treat that as an ownership
  decision: either the generated component owns stable shared resources, or a
  parent route owns cleanup when the assets become obsolete.

## Deployment Fit

- Decoder/CDN paths must follow the app's CSP, offline, asset-prefix, and
  deployment rules.
- Asset URLs should be stable and public/importable according to the target
  bundler. If a GLB request returns HTML or a redirect, fix the asset pipeline
  before changing scene code.
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: 472kUpdated Claude CodeCodexVerifiedInstall
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: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
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 availableStars: 322kUpdated Claude CodeCodexVerifiedInstall