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/native-asset-loader-recipes.md

View on GitHub
# Native 3D asset loader recipes

Skill: native-three-r3f
Checked at: 2026-06-04

## When To Load

- Read when loading GLTF/GLB, textures, HDR/environment maps, or decoder-backed assets in native Three/R3F.

## Source Anchors

- https://docs.pmnd.rs/react-three-fiber/getting-started/installation#react-native
- https://threejs.org/manual/#en/cleanup
- https://drei.docs.pmnd.rs/loaders/gltf-use-gltf

## Reference Notes

- Native asset loading needs bundler-safe imports, URI resolution, and platform proof. Public web URLs and decoder paths may not map to native.
- Large meshes/textures need memory budget and loading fallback. Compression helps only when the decoder path is available.
- Scene cleanup must include externally created materials, geometries, textures, controls, and renderer resources not owned automatically.

## Focused Checks

- Test missing asset, reload, route unmount, memory pressure, and app background/foreground.
- Verify dimensions and DPR/quality on device.

## Failure Modes

- Remote unpinned model URLs in production UI.
- Large uncompressed textures loaded before the screen needs them.


## Operating Guidance

React Three Fiber native, Three.js in Expo/React Native, expo-gl/WebGPU boundaries, GLTF/assets, native GPU lifecycle, and platform validation.

### Decision Boundaries

- Use web-three-r3f for browser Three/R3F.
- Use typegpu for web TypeGPU code.
- Use native-skia for 2D canvas drawing.

### Workflow Details

1. Inspect Expo SDK, GL/WebGPU package, R3F/Three versions, and asset pipeline.
2. Choose native R3F only when a 3D scene is the product surface.
3. Own canvas dimensions, DPR/quality, loaders, and cleanup.
4. Validate on device/development build for native GPU risk.

### Gotchas

- Browser R3F examples often assume DOM/WebGL APIs absent on native.
- Native asset loading and decoder paths differ from web.
- GPU runtime changes need device proof, not just TypeScript.

## 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.
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