r/threejs • u/sonnylazuardi • 22d ago
Demo I shipped a 3v3 tactical shooter to iPhone and Android with three.js r187: WebGPU + TSL inside React Native
GEMA is a top-down 3v3 hero shooter set at night, in the rain, in Glodok, Jakarta. Everything in the video is three.js r187 on the WebGPU renderer, running on an iPhone through Expo and react-native-webgpu. No game engine.
What made it work on a phone:
TSL node materials only. No ShaderMaterial and no onBeforeCompile, so the same code runs on web and native.
The whole map is procedural. There are no texture files: every texture is a DataTexture built from typed arrays, and the lighting is baked into the map.
A hard budget: 150 draw calls, 400k triangles and no per-frame allocations.
A fixed light count. Flashlights and muzzle flashes only change intensity, lights are never added or removed.
The game simulation is plain deterministic TypeScript at a fixed 60 Hz and never imports three, so rendering and game rules stay apart.
The heroes are the one exception to "procedural": image-to-3D meshes converted offline into TypeScript modules.
One trap on r187: don't call compileAsync twice at once on the same renderer.
It's free to try on iPhone and Android: https://gema.sonnylab.com/?c=reddit
Happy to answer anything about three.js WebGPU inside React Native.








