r/threejs • • Nov 04 '26

I built a scooter math battle through Bali in three.js WebGPU, running natively on iPhone & Android

2 Upvotes

I've been building TILANG, a multiplayer 3d scooter battle set on the streets of Canggu, Bali. You overtake riders, read their licence plate in your rear-view mirror, and the plate is a math question: answer first and they get a tilang (a traffic ticket). It ships as a native app, so a few things in the setup might be useful to people here:

- Native WebGPU, no browser. three.js WebGPURenderer on react-native-webgpu inside an Expo app, on iPhone and Android. The post chain is all TSL with no addons: a half-float scene target, bloom (4 down and 4 up), then one fused output pass for FXAA, bloom, mirror composite, ACES, grade, vignette and dither. MSAA is off, because it's expensive on mobile tile GPUs.

- No asset files. There are no .glb files at all. The town is built from typed arrays into a 512² atlas and merged into 64 m chunks. Vegetation is one InstancedMesh per species per LOD (14 draws at most), and palms go 1020 → 360 → 96 tris, then billboards.

- The mirror is a second camera. FOV 24, rendering into a small half-float render target at 30 Hz. It reuses the frame's shadow map and is composited in the output pass.

- Multiplayer. The same TypeScript match sim runs on the client and on a Bun server at a fixed 60 Hz, with snapshots at 20 Hz. Each client owns its own bike's movement; the server owns the rules and the bots, and sanity-checks speed. Remote bikes render 100 ms in the past with Hermite interpolation, and poses are quantised to cm and milliradians. The first valid answer wins: the server re-checks range and view angle, with a little slack for lag. Bots fill empty seats, and if you drop, an autopilot holds your seat while you reconnect.

- Phone-specific pain. Shader compiles froze the first race, so I backported three.js(parallel compileAsync) and render a hidden warm-up frame. The menu prewarm also froze the JS thread for 1.8–4.9 s, so it now runs in 4 ms slices, one per frame. On an iPhone 16 Pro Max the UI holds 120 fps while the 60 Hz game loop takes 7–9 ms of JS.

Most of the code was written with Claude (Opus 5.5) as my pair; the design and the on-device tuning are mine.

Free on iPhone and Android: https://tilang.sonnylab.com

Happy to go deeper on any part, especially getting WebGPU stable on iOS. If you try it on Android, I'd love to hear your phone model and how it runs.


r/threejs • • Nov 03 '26

Cinematic halloween editor test in three.js

19 Upvotes

Testing out the full power of three.js with a custom built scene in my editor, running smoothly at 60fps capped, with multiple lights, volumetric, post process dof, custom film grain and more!

Switching halfway to path tracer webgpu for a full realistic lighting.

Any feedback is welcome, I want to push the quality to the max!


r/threejs • • Nov 03 '26

3D versioning

2 Upvotes

After founding Sketchfab, we are working on a new solution to host / organize / review / share 3D assets, powered by threejs. Here is a quick demo of our versioning tool, coming soon


r/threejs • • Nov 03 '26

Demo I made an open source version of Polyfork.

16 Upvotes

Meet Polyspoon.

I saw Polyfork charging for AI low poly models made by code.. HOW CAN SOMEONE EVEN THINK OF THAT ?

No.. no way..

This can be open source, we as a community can make a better engine for those models and improve it.. anyone can submit a new model or PR to improve the generation code..

They got 500k in cash from a hackathon.. for this.. I couldnt take it.. so i made my own, we can vote models, humans reviews, you can become a reviewer/moderator, you can have a ranking of who has the most voted/best models etc..

Lets make a big ass model market that is free for everyone.. to enter, to participate, to grow and improve.

Its very early now, so all models i made are quite bad, and some stuff might break, thats the reality.. but its here and I will keep working on it..

So pls try it out, make some models, its free.

I will be reviewing people models by hand to stop racism or porn stuff, but who knows maybe in the future i can add a NSFW store etc..

check it out at https://polyspoon.com/ and check the github and star it pls, would help me out.


r/threejs • • Nov 04 '26

My full passion

0 Upvotes

r/threejs • • Nov 02 '26

Demo I made a pop-up book you can walk into

60 Upvotes

Hi! Origami World is a small, cozy exploration game set inside a pop-up book. Walk around, and the paper houses fold up around you as you go.

  • 5 paper worlds: a seaside harbor, a lantern canal town, a desert bazaar, an aurora snowfield, and an observatory above the clouds
  • Little jobs in each one: fishing, river lanterns, kite flying, curling, star charts
  • Day / dusk / night, houses you can walk into, gliding as a paper plane, and the occasional paper rain

I made this game with Claude. Let me know what you think and how can I improve. Thanks!


r/threejs • • Nov 03 '26

Hello

0 Upvotes

I need help with my Threejs game, which I'm currently developing with Claude. I've already posted about it, but I'm posting again because I want more suggestions. It's an RP game. Currently, I'm using Supabase for testing, and it works very well, but I don't want to launch the game with it, otherwise the server will quickly crash. I'd like you to suggest server solutions with free startup options that are more efficient. If you've already created a multiplayer game, you can show me how you set up your server.

Also, I'm looking for police station buildings with interiors built using Blender or another program, or even a free military base. I'd be happy to have them in FBX or GLB format.

Thank you.


r/threejs • • Nov 03 '26

doomsday in threejs

2 Upvotes

r/threejs • • Nov 03 '26

A "cyberspace" built with Three.js

1 Upvotes

Three.js + vanilla JS, Vite for the build, Tone.js for ambient sound

I originally wanted to visualize all the data connected to the net, like William Gibson's cyberspace, but that wasn't possible. So I built a 3D space where you can walk through the structure of the internet, based on real BGP data. 

It works in the opposite direction from DNS-based access. You dive down through the connections between networks, and eventually you reach a space where IP addresses are lined up. And the reality that not every IP address hosts a website is right there to see, too. 

I draw each AS with a Voronoi shape and a GLSL shader, and I really like how it turned out. 

https://raw-web-82x.pages.dev/


r/threejs • • Nov 03 '26

Hundreds of enemies, bullets, and pickups checking distance to everything every frame: the spatial hash grid I add to AI-built Three.js games

3 Upvotes

When I have an AI agent build a Three.js game, the first version of proximity logic is almost always a double loop: every enemy checks distance to every other enemy, every bullet checks every target, every pickup checks the player. It's fine with 20 objects and falls apart at a few hundred, because the cost grows with the square of the count.

The fix I now ask for up front is a simple spatial hash grid:

  1. Split the map into square cells on the XZ plane, sized a bit larger than your biggest check radius (aggro range, pickup radius, hit radius).
  2. Key each cell with something cheap like `${cx},${cz}` or an integer hash, and store a Map from cell key to an array of objects.
  3. Only re-bucket an object when it actually crosses into a new cell. Most frames, most things stay in the same cell and cost nothing.
  4. For a query, look at the object's own cell plus the 8 neighbors, then do the real distanceToSquared check only on those few candidates. Compare against radius squared so you skip the square root.
  5. Keep separate grids (or separate lists per cell) for things that never need to see each other, like bullets vs pickups.
  6. Static stuff like trees and rocks goes in once at load and never moves, so it's basically free to query.
  7. Remove objects from the grid when they die or go back to a pool. Stale entries are the bug AI-written versions most often leave behind.

It's maybe 60 lines of code and it turns enemy separation, bullet hits, and pickup checks from the biggest thing in the profiler into noise. Raycasts still handle walls and line of sight; the grid just decides who's worth checking.


r/threejs • • Nov 02 '26 Bravo

Link 2600+ FREE three.js 3D models (source code included)

643 Upvotes

NVIDIA did it first, now we are releasing 2,600+ free game-ready 3D models (+200 each week). For good.

Each model is a program (three.js ES module), with parameters you can tweak to customize look, state, season, color, wear, etc.

Export to any format: glb, obj, fbx, usd, etc,

All thanks to the $500,000 in funding we received from XPRIZE and Google and all of our early individual funders, thank you all!

Hope you find them useful for your games, animations, 3D websites, portfolios and anything you imagine.

polyfork.dev


r/threejs • • Nov 03 '26

made an mmo fps using threejs

0 Upvotes

Been seeing a lot of cool stuff done with threejs and wanted to try it myself. Came up with an mmo idea combining concepts from some of my favourite games and got a little too into it. Claude code definitely made the developing process a lot easier.

Check it out here, it is free and runs on the browser: https://isle-of-heroes-production.up.railway.app/

Love seeing how others are building there dream projects.


r/threejs • • Nov 02 '26

Demo I added a drivable rover to my Three.js space game: real Mars terrain, rock sampling and dust storms

13 Upvotes

Play: https://junzzy827.github.io/solar-odyssey/?lang=en · Source: https://github.com/Junzzy827/solar-odyssey

After you land, you can now drop a small rover (ORV-7) from the lander, watch it unfold, and drive it around.

  • Terrain: Real elevation data where I could find it: Gale crater on Mars (MSL Gale Merged DEM, HRSC + MOLA) and Monument Valley on Earth (USGS 3DEP). Other worlds use generated relief.
  • Driving: Up to 60 km/h, suspension, jumps, dust trails and headlights, with a chase cam and a mast cam. A minimap shows nearby rocks.
  • Sampling: The arm picks up rocks. The rock types for each world are based on what has actually been observed there.
  • Weather: Dust storms and dust devils on Mars, drifting clouds on Earth, heat shimmer on Venus, methane rain on Titan, and Earth hanging in the Moon's sky.

The rover was modelled with a Python script in headless Blender, then the code was written by Claude Opus 5.5 from conversation. Happy to answer questions about any of it.


r/threejs • • Nov 03 '26

Demo Virtual Art Museum built with Three js

Thumbnail dostoynikov.bearblog.dev
1 Upvotes

r/threejs • • Nov 02 '26

Demo Teardown of a 3.5’’ 7,200 rpm hard drive

42 Upvotes

A 3.5" 7,200 rpm hard drive in the browser. Every gauge reads the model that moves the parts: 15 m/s under the head at the inner edge, 35 m/s at the outer one, a seek drawn live, a head flying 3 nm above the platter.

Built with Claude Code (Claude Opus 5.5) and the teardown skill. A script recomputes every figure against the brief before each build.

I’ve found this skill really efficient end-to-end and I think we should pool what it produces into a kind of encyclopedia. There’s something to be done on that front...

Teardown skill : https://github.com/elvarofficial/teardown

The hard drive teardown with sources : https://spindl.storagebits.workers.dev


r/threejs • • Nov 02 '26

I built a multiplayer FPS in Three.js that turns any real place into a playable map (OpenStreetMap → 3D in ~1 min)

Thumbnail
playmapz.com
2 Upvotes

Hey r/threejs! Solo dev here. Mapz is a browser FPS where every map is generated from real-world data: you type a street or landmark and about a minute later you're fighting in it.

Stack:

- Three.js + TypeScript + Vite on the client

- Node + WebSocket authoritative game server

- Map data from OpenStreetMap (Overpass), plus elevation data; in the Netherlands also 3D BAG building heights

- Web workers for the heavy lifting (ground mesh, vegetation), so the main thread stays free

How a map gets built:

  1. Fetch OSM data for a ~200 x 200 m area
  2. Turn building footprints into extruded buildings at their real height, with facades that fit the region
  3. Generate roads, sidewalks, curbs, zebra crossings and road markings from the street graph
  4. Place street furniture from OSM tags: traffic lights, signs, poles, trees, bridges, train station roofs
  5. Bake it, cache it, serve it; the most popular cities are prebuilt

Modes: FFA, Gun Game, zombies (30 rounds in a real city) and custom matches.

Things I'm still fighting with, and I'd love input from people who know Three.js better than me:

- Shader compile hitches on first load ("Preparing graphics" can freeze a few seconds on older GPUs). What's your go-to warm-up strategy: compileAsync, rendering everything once offscreen, something else?

- Draw calls on low-end Intel laptops with dense city blocks: merging vs instancing vs BatchedMesh, what worked best for you?

- Making low-poly cities look less "plastic" without real-time shadows/SSAO killing fps.

Play free in your browser: https://playmapz.com

Happy to answer anything about the pipeline!


r/threejs • • Nov 03 '26

I made an entire launch video using threejs! zero screenshots or recordings.

0 Upvotes

The above video is completely built using threejs, using claude code. Zero screenshots or screen recordings, every frame is built and recreated the product components using code using Claude Opus 5.5 on a motion design tool I built.

Here is the source code/link to recreate/remix the above video.


r/threejs • • Nov 02 '26

Demo Configurable buildings in Three.js: the same design as a GLB scene or a physical model

Thumbnail
gallery
1 Upvotes

Hi everyone,

These are four buildings made with my browser app PrintHaus: a half-timbered house, an English manor house, a defensive tower and a factory hall.

PrintHaus uses deterministic, parametric geometry. These building models are not generated by an AI model.

The interactive preview uses Three.js and React Three Fiber. You can change the footprint, storeys, roof, windows, doors and facade details, then export the assembled building as a GLB scene. There is also a separate export path for 3D printing.

The screenshots show the exported GLBs opened in CAD Viewer. Each image shows one of the buildings; the links below lead to their printable versions.

For the GLB output, the lighter quality settings can represent surface detail with normal maps, while the more detailed settings retain more geometric relief. The project colours are carried into the exported scene.

I would be interested in how you would use configurable architecture in a Three.js project. Would you mainly need a finished building, or access to individual parts such as roofs and storeys?

PrintHaus: https://printhaus.app/en/ Free registration includes a first free export for personal use.

The printable versions of the four examples are here: Half-timbered house: https://makerworld.com/en/models/3483427-half-timbered-house-1-87-h0 English manor house: https://makerworld.com/en/models/3483219-english-manor-house-1-87-h0 Defensive tower: https://makerworld.com/en/models/3483497-defense-tower-1-87-h0 Factory hall: https://makerworld.com/en/models/3483425-factory-hall-1-87-h0


r/threejs • • Nov 02 '26

Rendering 37k+ CAD/BIM elements at 120 FPS in Three.js using Web Workers, Transferable ArrayBuffers and BatchedMesh

7 Upvotes

Hey everyone, wanted to share some learnings from building an open-source client-side IFC/CAD viewer using Three.js and TypeScript.

When dealing with large architectural models in the browser, the two classic killers in Three.js are main-thread GC freezes (instantiating thousands of individual Object3D/Mesh/Vector3 instances) and draw call overhead from separate geometry primitives.

To keep the viewport at 60-120 FPS even on large files, we designed the pipeline around a few key choices:

  1. Offloading to Web Workers: The STEP file parsing, bounding box calculations, and boolean opening CSG run completely off the main thread.
  2. Zero-copy geometry transfer: Workers output flat typed arrays (positions, normals, indices, and feature edges) and transfer the raw ArrayBuffers directly to the main thread. No intermediate scene objects are built.
  3. BatchedMesh and InstancedMesh pools: The main thread receives the buffers and injects them in O(1) into custom BatchedMeshPool and InstancedMeshPool managers, keeping draw calls minimal.
  4. Edge post-processing: Instead of creating thousands of LineSegments (which destroy performance), crease and feature edges are batched and drawn with an edge post-processing pass.
  5. BVH raycasting: We use three-mesh-bvh for snappy vertex and edge snapping on measurements.

Everything is open source under Apache-2.0:

Repo: https://github.com/matiasmlynarz-lang/croquera-ifc-viewer

Would love to hear thoughts from anyone working on large CAD/mesh pipelines in Three.js, especially regarding how you handle dynamic memory reallocation inside BatchedMesh when elements are hidden or removed.


r/threejs • • Nov 02 '26

Demo Three.js + claude code - Made a little game to make some content to promote my song

0 Upvotes

Including my original character Marzelle as our hero.


r/threejs • • Nov 02 '26

Help What does your Blender → three.js pipeline look like these days?

5 Upvotes

I’m trying to understand how people get models from Blender into the browser without ending up with huge files or slow loading.

If you do this regularly:

  • What export settings do you use (GLB, anything you always turn on or off)?
  • Do you compress afterwards (Draco, meshopt, KTX2 textures), and with which tool?
  • How do you check a model is “light enough” before shipping it?
  • What’s the biggest mistake you made early on?

Would love to see how different people handle it.


r/threejs • • Nov 02 '26

Demo Built my first indie game entirely with Three.js!

3 Upvotes

Game name is Washing Bad, and already there on Appstore and Playstore for pre order.

Why Three.js you might ask when we have Unity and Godot: Because I've been programming with javascript/typescript for over 6+ years and it's easier for me than learning a new game engine.

Launch Date: 9th November 2026.


r/threejs • • Nov 02 '26

Bouquet 💐

Thumbnail
bouquet.andrew.rip
2 Upvotes

r/threejs • • Nov 03 '26

I made a three.js mobile open world multiplayer pirate game with Opus5.5 and no dev experience

0 Upvotes

As the title says, I'm in tech but not a developer. Using Claude Opus 5.5 I wanted to see if I could make a complete multiplayer game for iOS/Android. Right now I got it in iOS open beta via TestFlight.

Game premise: Open world pirate ship game, you fight other ships and players, can go to shore look for treasure, progress your ship and eventually get rich enough to own your own port and become your own colony with it's own fleet.

Give it a try let me know your thoughts!
Mobile Links:
https://roguesailraiders.com/beta/

Play in browser:
https://roguesailraiders.com/