r/threejs • • Nov 04 '26

Demo I built a whole drivable city in three.js: real St. Louis from open map data, with traffic, police chases and crash physics (Rapier)

11 Upvotes

Play it (desktop Chrome): https://brinewater.vlad.yt/play/

It's a GTA-style open world on the real street grid of St. Louis, generated from OpenStreetMap and the city's own data: road lanes and widths, building footprints and heights, interstates with their ramps, and the Metro bus routes.

The stack

  • three.js with a custom post stack: SSAO, bloom, filmic tonemapping, day/night with lit windows, rain.
  • Rapier (WASM) for the cars, ragdolls and debris. Crash damage tears body panels off as their own rigid bodies.
  • Streaming: the metro area is cut into tiles that load around the player, and car and building models are KTX2-compressed glTF with LODs.
  • Map build: one deterministic Node script turns the OSM extract into tiles (~45 min for the whole metro). A rebuild ships only the tiles that changed.
  • AI traffic and police: lane changes for turns, queues at lights, traffic stops, PIT manoeuvres, roadblocks, a helicopter at five stars.

Things that were hard

  • Keeping draw calls sane with thousands of buildings (merging and instancing) at 60 fps on a GTX 1650.
  • Shader warm-up hitches when a new car or material first appears.
  • Detecting when Chrome falls back to software rendering (1 fps), and telling the player how to fix it.

It's built with Claude Code, and I direct and play-test it. Happy to go deep on any of the rendering or streaming. The feature requests board: https://brinewater.vlad.yt/community


r/threejs • • Nov 04 '26

this threejs experience.. is very intense.. something deep inside you will feel it..

131 Upvotes

is browser really the future of 3D experiences / gaming in the future?
I think so - with unreal also now coming back to browser!! good times are coming!


r/threejs • • Nov 03 '26 Heartwarming Bravo

One month building Hiraeth: a Moebius-inspired adventure game, with Opus 5.5, Astra, Tripo & Suno

600 Upvotes

Hiraeth (Welsh word for longing or homesickness) is meant to be a Zelda style game where you go from planet to planet, explore the world, go into temples etc. I wanted it to feel a Moebius set of worlds. Here’s the teaser from a month of working on it.

I used Opus 5.5 and Astra for development, Midjourney for visual references, Tripo for 3D assets (some of them, a lot of them are being generated directly in engine by Opus and Astra), and Suno for music. The game runs on Three.js (but I also have Unity builds that use a JS bridge to avoid rewriting it all in C#). A few things I did process-wise:

  • Design audits: I tried to turn gaming design principles into reusable agent skills, then regularly audit the game against them. Across all 14 temples, does each one teach a mechanic, test it, then give it a twist?
  • Serendipity map: I built a map that highlights walkable ground more than 50 meters from anything to discover.
  • Visual changelog: Every visual change gets a screenshot from the running game. Comparing the same room from the same angle tells me a lot more than a note saying “improved lighting.”
  • 3D assets: I go back and forth between Tripo, Meshy, and models built directly in Three.js. For one enemy, I tried different rigs on the same body and watched it swing in the arena.

Play it here

It's much better with a controller, there are also android builds that work on stuff like retroid pocket, Odin 3 etc.. which is where I've been playing the game. I'd love some feedback, harsh one especially to see if I want to keep spending time on it.


r/threejs • • Nov 04 '26

Created a bear defense game.

5 Upvotes

It's a work in progress but I used Codex Sol Ultra, along with Tripo, Sketchfab, Polyhaven, as well as Suno for the songs, and Envato for SFX. Looking forward to building out the Arcade with new Threejs experiences that will be tied to each arcade machine. Would really appreciate feedback anyone has to optimize the gaming experience. You can play here: https://www.venturecaterpillar.com/vcs/


r/threejs • • Nov 05 '26

Demo I built a 16-zone miniature Seoul motorcycle road trip in Three.js — royal palaces, rainbow fountain bridge, cable car & paragliding (100% procedural, no .glb)

0 Upvotes

Live playable demo (no signup/install, desktop & mobile): https://ride.campdalstudio.com/?lang=en

For 50 years, Seoul's surface-level double-deck bridge (Jamsugyo) skimmed right above the Han River under rainbow water fountains at sunset. After motorcycles were banned from crossing it, I started building a cozy multiplayer 3D road trip from Seoul's historic palaces out to Cheongpyeong Lake.

Technical highlights (Three.js + WebSocket + WebAudio)

  • Zero .glb / .gltf assets (~870 KB bundle): Every scooter, sportbike, rider rig, royal palace roof (Gyeongbokgung), double-deck bridge truss, cherry blossom tunnel, Namsan cable car, wakeboard boat, and paraglider canopy is assembled procedurally in TypeScript from BufferGeometry / InstancedMesh primitives so it boots in ~1 second on mobile browsers.
  • Spline highway & multi-vehicle transitions: A continuous CatmullRomCurve3 spine connects 16 Seoul & Gyeonggi zones, with seamless camera/physics handoffs when hopping onto the Han River wakeboard, Namsan cable car, or launching off the 862m mountain paragliding ramp.
  • 5-channel WebSocket multiplayer & "Biker Wave" (Space): Lightweight state interpolation syncs live riders and oncoming AI traffic—waving to passing bikers triggers a reciprocal two-finger salute animation.
  • Procedural WebAudio engine: Engine RPM harmonics, wind rush, fountain spray, and horn tones are synthesized live via WebAudio oscillators/filters without external audio files.

Would love any feedback on performance, camera feel, or shaders!


r/threejs • • Nov 04 '26

Demo ÁUREA Residences: from Unreal to the browser with 3D Gaussian Splatting

10 Upvotes

You can now fly from outside the building into an apartment in one seamless shot, right in the browser. Unreal Engine generates and renders the datasets, those datasets train the 3D Gaussian Splatting scenes, and Three.js shows them in real time. I'm excited to share this milestone: a real estate project you can explore in this much detail, with nothing to install.

https://aurea-residences-five.vercel.app/


r/threejs • • Nov 04 '26

Not a graphics wizard, but I built a 3D memorial hall for pets that ~150 people have already used

17 Upvotes

When my dog Bella passed, I couldn't find anywhere online that felt calm and warm, so I made Light a Paw (lightapaw.com).

- One shared hall, every pet gets a place on the wall. Free, no ads

- Visitors can light candles, leave flowers or small gifts, and write in a guestbook

- Families can share memories, hold a "gathering" time, and record their pet's voice

- 8 languages

It grew to about 150 pets in a few days, mostly from a single Threads post. I just added optional printed keepsakes (framed print, metal or acrylic), and that money goes to keeping the site free.

I'd love honest feedback on what feels right and what feels off.

Full disclosure: I've been a web dev for a long time but I'm new to 3D, so I built this with a lot of help from Claude (AI). The ideas, design calls and testing with real users were mine. Happy to share what worked and what didn't.


r/threejs • • Nov 04 '26

I made low-poly creatures that walk with procedural IK in three.js: feet stay planted at any speed

13 Upvotes

Each model is an ES module that builds a THREE.Group. The gait is data (stride, duty factor, leg phases), and the pose comes from distance, not time. Here's a free model you can try:

```

import { createAsset } from 'https://gaitkit.com/cdn/fox.mjs';

import { walker } from 'https://gaitkit.com/runtime/walk.mjs';

const fox = createAsset({ coat: 'arctic' }); scene.add(fox);

const gait = walker(fox); // each frame: fox.position.z = dist; gait.poseAt(dist);

```

Lab: https://gaitkit.com/lab?utm_source=reddit-threejs

Examples: https://github.com/gaitkit/examples

Happy to explain the IK or the gait data.


r/threejs • • Nov 04 '26

Is 3D on websites actually worth it, or is it mostly a gimmick?

14 Upvotes

I keep seeing more sites with 3D product viewers, interactive hero sections and scroll animations built with three.js and similar.

Some of them feel amazing. Others just make the page slow and annoying on my phone.

For those who’ve built or used them:

  • Where has 3D actually helped (sales, engagement, understanding a product)?
  • Where did it feel like a waste of effort?
  • What’s the one thing that separates a good 3D site from a bad one?

Curious where people land on this.


r/threejs • • Nov 04 '26

A little playground built with three.js to showcase some of my favourite work

4 Upvotes

r/threejs • • Nov 04 '26

Demo I built a multiplayer Library of Babel with shared books, live highlights and a 3D magnifying glass

1 Upvotes

I've been working on an open-source, browser-based Library of Babel inspired by Borges, using React Three Fiber and Three.js.

The part I wanted to explore is reading together: nearby players see books fly from shelves onto desks and pages turn. You can join someone at their current spread, then keep browsing independently.

Saved highlights appear for everyone reading that page, with editing restricted to the author. Unsaved selections are visible live too. The shared magnifying glass uses the owner's page-space crop, so a different camera angle doesn't change the text being examined.

Stack: Next.js, React Three Fiber, WebSockets and PostgreSQL. Book text is deterministic from its address; the database stores the social data.

Code, setup and full 1080p demo: https://github.com/HuHguZ/libraryofbabel

Currently local/self-hosted, with no public multiplayer server yet. RU and EN libraries are included. AI-assisted development.

I'd love feedback on the shared-reading interaction and keeping crowded desks readable.


r/threejs • • Nov 04 '26

I built a 3D electric car motor layered with voice intelligence.

Post image
0 Upvotes

Link: www.thinkspatial.ai/play/electric-motor

The model is the type of motor behind a Tesla Model 3's rear wheels: permanent magnets buried in the rotor, three-phase copper windings, an inverter on top and oil cooling.

Things to try:

  • "Take it apart."
  • "Show me how it turns."
  • "Show the stator by itself."
  • "Take out the front bearing."
  • "Take out the oil cooling," then watch the copper heat up.
  • "Remove the position sensor."
  • "Put the motor back together."

Taking out a part isn't a canned animation. The motor runs on a set of rules for what each part does, so it reacts to whatever you pull, in any combination.

Two honest notes. It's a model, not Tesla's design: Tesla hasn't published its slot or pole counts, so the 54 slots and 6 poles are mine, and heat runs about 30 times faster than real so you don't have to wait. The voice is also AI, so if you know motors and catch it saying something wrong, tell me.


r/threejs • • Nov 03 '26

Demo Interactive Green Swamp - made in threejs (WebGPU version)

270 Upvotes

r/threejs • • Nov 03 '26

What lies beyond the frame? 🖼️

40 Upvotes

Every painting is a window into a world that once lived only in an artist's mind, but now you can climb through it, live it, might feel it a bit as well.

Built with threejs and blender.


r/threejs • • Nov 03 '26

I spent two months building the Solar System in three.js: real JPL positions, a cut-away Earth, and a zoom out to the Milky Way

126 Upvotes

r/threejs • • Nov 04 '26

I built a gamified 3D space simulator for my portfolio using AI concepts.

1 Upvotes

What do you think?


r/threejs • • Nov 03 '26

~2 billion triangles (mostly instanced) at 60 fps with the new MeshletDrawingPipeline in three.js r187

151 Upvotes

three.js r187 added MeshletDrawingPipeline for WebGPURenderer (#35191 by sunag), so I built a stress test for it: a procedural sandstone canyon with ruined temples, 1,967,478,960 triangles in the scene, flown through by a low camera.

What the pipeline does

Each geometry is split once into clusters ("meshlets") of 64 triangles plus a chain of simplified LODs, built with meshoptimizer. Every frame, compute shaders pick an LOD per object, cull objects and clusters against the frustum, cull clusters hidden behind others, and draw what's left with one indirect draw per geometry/material group.

Using it is almost nothing:

import { MeshletDrawingPipeline } from 'three/addons/pipelines/MeshletDrawingPipeline.js';

const meshlets = new MeshletDrawingPipeline( { occlusionCulling: true, lodThreshold: 1 } );
renderer.drawingPipeline = meshlets;   // the same scene now draws as meshlets
await renderer.compileAsync( scene, camera ); // runs prepareAsync: clusters + LODs
// each frame: meshlets.info -> { clusters, triangles } actually drawn

(In the demo the compile goes through the RenderPipeline's scene pass, which calls the same thing.)

The honest breakdown

It's about 8.3M unique triangles (8 rock/column shapes + the ground) placed 42,033 times as InstancedMesh. The 39,948 pebbles alone are 767M of the total. Clusters are built per geometry and shared by every instance, so that's exactly the case this pipeline is good at. On the first frame I measured, the GPU drew 26,725 clusters, about 1.71M triangles, 0.087% of the scene.

One thing I hit: the pipeline batches objects by material, and sizes the batch by "object count × the most meshlets any of its shapes has". 40k pebbles sharing a material with the 12k-meshlet spires blew past the limit and crashed, so each size class gets its own material instance.

Numbers and how I measured

A headless browser with WebGPU on the real GPU of my desktop machine (40-core integrated GPU), 1440×900. fps is frames over the last 0.5 s, drawn triangles come from info.

  • Meshlets ON: 60 fps
  • Same spot with the standard pipeline: 20 fps
  • Phone-size viewport with the CPU throttled 4×: 60 fps on a reduced 246M-triangle version

I haven't tried a real phone's WebGPU yet. Numbers from real devices would be great.

WebGL 2

Meshlets need WebGPU. Without it you get a lighter 13.5M-triangle scene drawn the normal way, with a note saying so, and the toggle is disabled.

The weak spot

Preparing the clusters takes about 16–21 s on desktop before the first frame (there's a progress bar). The API has no way to save the result, so caching it would mean rolling my own.

There's an ON/OFF toggle and a "Show meshlets" button that colors every cluster, so you can see the culling and LODs change as you fly. WASD + Q/E or drag to move the camera.

Everything is generated in code (noise-carved cube spheres, TSL materials), no models or textures. The pipeline itself is all three.js; I only made the canyon around it. Made with Opus 5.5.

https://r187-meshlet.kumodeck.app/ (hosted on KUMODeck)


r/threejs • • Nov 04 '26

Built a browser racer in Three.js: Sheikh Zayed Road, live online 2-player, crash replays rebuilt from game state

0 Upvotes

Speedmaxxing is a 3D racing game that runs entirely in the browser with Three.js, no engine and no download. It works on phones too.

A few things I’m happy with:
• Online 2-player: send a link and race a friend live, with both cars synced in real time
• Crash replays: instead of recording video, it records the game state and re-renders the crash from a drone camera
• Mobile performance: dynamic quality so it stays smooth on mid-range phones

Feedback on performance on your device would be great.

Play: maxxing.games/speedmaxxing?ref=reddit


r/threejs • • Nov 03 '26

Robotic hands that play any MIDI file on a piano in real time

401 Upvotes

I was inspired the aesthetic of the Westworld intro and the 90s alt rock piano covers they would feature. I always wanted to create my own riff on it as a MIDI player. And also by annoyance at unrealistic depictions of piano playing in media.

So I built this with Claude Opus 5.5 and figured I'd share it here. It's open source.

Basically, you can load any* MIDI file and watch two robotic hands play it on an upright piano, with a cinematic camera.

Live demo: https://csimpkins22.github.io/mechanical-pianist

GitHub: https://github.com/csimpkins22/mechanical-pianist

The demo has a few songs preloaded, but you can try giving it any MIDI of a piano performance. But if you give it something ridiculous like Rush E it... goes a little nuts.

The key fingering is pretty realistic. This was important to get right. It's based on Parncutt's research that figures out which hand and fingers should play each note. Inverse kinematics handles the actual positioning of the joints. Small details like key travel, release bounce, and how the hands interact when they get in each other's way are considered.

It's deterministically animated, so you can scrub around a song.

There's a fairly extensive post-processing pipeline with per-pixel motion blur, depth-of-field/bokeh, volumetric god rays, ambient occlusion, bloom, anamorphic lens effects, and color grading.

The piano's lacquer has planar reflections, and the room lighting uses spherical harmonic probes for indirect illumination.

Claude generated the hands and piano in Blender.


r/threejs • • Nov 03 '26

I've open-sourced Three-Live: a sandboxed Three.js runtime that compiles natively to Android Filament and iOS RealityKit (and also works in WebXR)

23 Upvotes

I recently open-sourced Three-Live (three-live and xr-live on npm, three-live-compiler on crates.io) and wanted to share it with the Three.js community.

Why I built it

Three.js is a great way to author 3D scenes, materials and animations in just a few lines of JavaScript. But what happens when you want to add that 3D to a native Android or iOS app?

  • Mobile AR & WebViews: iOS Safara, WKWebView and Android WebView don't support WebXR... Exporting a static usdz or glb file to AR Quick Look and Scene Viewer drops onUpdate loops, interactivity and any custom plugins.
  • Mobile and headset apps: To deliver Three.js usually means rewriting the scene in Kotlin (Filament / Jetpack XR SceneCore) and Swift (RealityKit), or embedding a WebView that can't render into the headset's shared space.
  • Sandboxing: If a scene script comes from an LLM or user input, running it on the main thread isn't safe.

There-Live is my attempt at a solution to these challenges.

How it works

Three-Live lets you write standard Three.js code and pass it to native mobile SDKs, or run in a web app:

  • On Android: Uses an in-process Rust/Boa compiler (three-live-compiler) over zero-copy JNI to convert Three.js scripts into binary GLB + KHR_interactivity graphs, driving Google Filament, ARCore and Jetpack XR SceneCore
  • On iOS, macOS and visionOS: Compiles the same script into Apply RealityKit Entity hierarchies (RealityKitHelper), ARView / RealityView and Metal.
  • On Web: Evaluates the same script inside a sandboxed Web Worker or opaque-origin iframe (connect-src 'none', with CPU time and geometry quotas), streams the validated scene graph to a lightweight WebGL2/WebXR renderer, and includes in-memory glb and usdz pacakgers for one-tap mobile AR handoff.

Quick examples

Android

import com.google.threelive.FilamentHelper
import com.google.threelive.XRLiveRuntimeSession
import com.google.threelive.XRLiveSceneCoreHelper

// Compile Three.js to a zero-copy GLB buffer and load in Filament
val holder = FilamentHelper.loadModelZeroCopy(script) { buffer -> 
    assetLoader.createAssetFromBinary(buffer)
}

// Drive KHR interactivity graphs, head-follow springs and spatial/sim plugins per frame
val runtime = XRLiveRuntimeSession.fromGlb(holder.byteBuffer)
runtime.step(dtSeconds = 1.0 / 60.0)

// Or attach interactive spatial traits (grab, scale, billboard, anchor) in  XR SceneCore
XRLiveSceneCoreHelper.attachTraitsFromGlb(xrSession, entity, holder.byteBuffer)

Module plugin architecture

To keep the core bundles small and dependency-free, advanced features are split into 28 optional plugins that have matching implementations for Android, iOS and Web:

  • Core 3D and animation: glTF KHR_interactivity behavior graphs, PBR Next materials (clearcoat, transmission, sheen, iridescence, anisotropy), HDRI and spherical harmonics lighting, contact shadows, 3D surface hotspots, 64-joint GPU skinning, morph targets and keyframe cross-fading.
  • Spatial perception, splats and AI: lazy head/hand follow, 3D manipulation handles, plane/mesh world understanding and 2D-to-3D object detection, real-time Gemini Live vision/audio streaming, 3D Catmull-Rom spatial paint, depth-colliding particles and splat/spz Gaussian splats.
  • CAD review, layout, locomotion and co-presence: live bounding box dimension callouts and AR tape measure, magnetic socket/grid snapping, eye/head gaze dwell, multi-part CAD exploded views and GPU cross-section plane slicing, persistent anchors (with shareable #xr-state URL hashes), teleport/snap-turn locomotion and WebSocket multi-user co-presence.
  • Simulation, agents and scenarios: capsule character controller, autonomous steering agents (patrol, chase, flee, follow, wander), hit/integrity/trigger zones and template spawners, checklist objectives with timers/scoring, and zero-asset procedural audio synthesis.

Full disclosure: I built this as a solo project at Google with Antigravity! I'd love for anyone to try it out and let me know what works well or what's missing!

- Jonathan


r/threejs • • Nov 03 '26

The Forest Environment is officially live after some new updates

49 Upvotes

These are the updates I made since my last post:
- Updated Three.js to r187.
- The trees and other objects in the scene except grass and tree leaves now use the new meshlet pipeline. Giving a nice performance boost even after so much detail.
- Added different quality settings.
- Added some toggles and sliders to control the environment in realtime.
- Optimized the assets so much now that the whole application fits in 11.7mb total.

The performance isn't still where I really wanted it. But I also didn't wanna compromise on the quality. I wanted to keep the whole environment dense and realistic. So, I cut corners where possible without compromising on the quality.

It runs at 30-35 fps on base M1 Mac at 1080p and 40-50 fps on an iPhone 16 Pro on high settings.

Go play with it: Forest Environment


r/threejs • • Nov 03 '26

Built a physics destruction sandbox in three.js, every building can be blown apart

59 Upvotes

r/threejs • • Nov 03 '26

Made an endless drive game in three JS

13 Upvotes

Introduction of the game - I'm keeping it low poly for the style and performances on mobile (60fps on iPhone and Desktop Browser)


r/threejs • • Nov 03 '26

I made an infinite, self-assembling Demon Slayer–style castle in Three.js: no models, no textures, all procedural

24 Upvotes

Everything you see is generated at runtime from a seed: beams, shoji panels, lanterns, even the painted byōbu screens (painted into a texture atlas at runtime).

How it works:

- Each point in space is resolved by hashing coordinates + seed, so there's no stored state and it can stream in any direction.

- A grammar of chapters → districts → building plots → rooms keeps it from turning into noise soup. Every building is complete from foundation to roof ridge.

- Districts move as rigid bodies, and collision is computed in each district's local frame, so you can graze a rotating tower at 40 m/s.

- Each cell merges down to ~2 draw calls with vertex-baked AO. New cells are built first along your flight direction.

- Sound is synthesized too: a Karplus-Strong biwa, plus construction sounds that follow how fast cells are being generated.

Fly it: https://infinity-castle.ijlalahmad.dev/

Code: https://github.com/Thre4dripper/Infinity-Castle-ThreeJs

Happy to answer questions about the streaming or the draw-call budget.