Skip to content

BjornMelin/dev-skills / archive/skills/native/native-three-r3f

native-three-r3f

Verified

Use this skill for React Three Fiber native, Three.js in Expo/React Native, expo-gl/WebGPU boundaries, GLTF/assets, native GPU lifecycle, and platform validation. Trigger on @react-three/fiber/native, Expo Three, expo-gl, react-native-wgpu, native Three.js, R3F native. Do not use for near-miss tasks outside these boundaries; route to adjacent motion or platform skills when they own the implementation.

references/docs-expo-webgpu-three.md

View on GitHub
# Expo WebGPU And Three.js Notes

Use this reference only when the task explicitly chooses native WebGPU,
`react-native-wgpu`, GPU compute, or Three's WebGPU renderer. It is not the
default native R3F path. For ordinary native Three.js scenes, use
`@react-three/fiber/native` with `expo-gl`; see
`r3f-native-api-notes.md`.

## When WebGPU Is Worth The Risk

- The feature needs compute shaders, very high particle counts, procedural
  simulation, or Three WebGPU renderer features that WebGL cannot provide.
- The app can use a development/custom native build and can validate iOS and
  Android device behavior.
- The repo accepts experimental dependency and renderer risk.

Use Expo GL/R3F native for scene-graph-first 3D, Skia for 2D canvas workloads,
and Reanimated for normal UI motion.

## Setup Checks

- Inspect the installed `react-native-wgpu`, `three`, `@react-three/fiber`,
  React Native, React, Reanimated, and Worklets versions before coding.
- Verify New Architecture and native build requirements from the installed
  package and official docs.
- Follow the target repo's package manager. Do not copy package-manager flags
  from examples without translating them to repo policy.
- Treat WebGPU support as native-risk: Expo Go is not enough for proof.

## Renderer Differences To Prove

- Three WebGPU usually imports from `three/webgpu`, not plain `three`.
- React Native WebGPU canvases need device-pixel-ratio sizing.
- Native WebGPU contexts require explicit frame presentation after submitted
  commands.
- R3F integration may need a custom root/canvas adapter because the standard
  native `Canvas` is built around Expo GL/WebGL.
- Any custom adapter must unmount the R3F root and destroy renderer/device
  resources on route exit.

## Validation

- Native build or EAS proof for each target platform.
- Device rendering proof, not just simulator proof.
- Resize/orientation, background/foreground, route unmount/remount, memory, and
  frame pacing.
- Fallback behavior for unsupported devices or failed GPU initialization.
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: 471kUpdated 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