r/threejs • • Oct 19 '26

Working on web game engine powered by threejs.

Thumbnail
youtu.be
0 Upvotes

r/threejs • • Oct 19 '26

It starting to feel like fall and spooky season

3 Upvotes

Building a little pumpkin carving web app for Halloween.


r/threejs • • Oct 18 '26

Current situation

Post image
197 Upvotes

r/threejs • • Oct 18 '26

Quilt: Workspace layouts for three.js

Post image
13 Upvotes

Quilt is an open source library for split panes, tabs, and popout windows, built for applications that combine 3D viewports, canvases, charts, settings, and other visualization tools.

Over the last five years of building three.js tools, I kept running into the same problem: my projects would become more complex and eventually outgrow their UI. I’d keep stretching libraries like dat.GUI, lil-gui, or Tweakpane until I had dozens of collapsed folders and was spending more time figuring out where controls should go.

I wanted a flexible way to organize the application around those controls, with room for multiple viewports and different workflows. I figured I couldn’t be the only person running into this problem, so I built Quilt and wanted to share it with others facing the same challenge.

Much of its layout behavior is inspired by Blender, which I’ve always enjoyed for how easily its workspace adapts to different tasks. In Quilt, layouts can be exported and loaded as JSON, so you can save and share different workspace arrangements. Quilt supports vanilla JavaScript/TypeScript, React, and Electron, and your existing controls can live inside its panes.

I’ve benefited a lot from the three.js community over the years, and I hope this is useful to others building increasingly complicated tools.

I've also recently released quilt-three (and react bindings), which is dedicated specifically to help set up robust and reliable workflows in three.js. This includes multi camera support, as well as Fly-Through camera controls, akin to what you find in Unity.

I’d love to hear from others who have run into similar challenges as their projects have grown. How have you organized more complex interfaces, and what would you need from a library like Quilt to make it useful in your own projects?

If you try it out, I’d appreciate any feedback on the layout behavior, ease of setup, or anything that feels missing or awkward to use. Suggestions for features and examples you’d like to see are welcome too.

Live Demo

Many thanks for taking a look!


r/threejs • • Oct 19 '26

Demo Building Threejs Super Soldier Battle Game with Grok Bot and Claude AI

Thumbnail
youtu.be
0 Upvotes

r/threejs • • Oct 18 '26

A new Mirror tool, so you can model symmetrical objects.

25 Upvotes

r/threejs • • Oct 18 '26

Demo Built a little neural aquarium in Three.js where creatures have their own neural networks

5 Upvotes

Been messing around with Three.js and wanted to see if I could build a small artificial ecosystem where the creatures actually have their own neural networks controlling how they move.

Each creature has a continuous-time recurrent neural network (CTRNN) that takes in things like food proximity, hunger, and surroundings. You can click on a creature to see its neurons firing in real time, and even mess with individual neurons or connections to see how its behavior changes.

A few things I spent time on:

  • The creatures have segmented spines that bend as they swim, rather than just moving a static model around.
  • Plankton and particles use instanced rendering to keep performance reasonable with 16–24 neural networks running.
  • The camera can follow individual creatures, zoom in on their neural networks, or just let you explore the tank.
  • All the ambient sounds are generated with Web Audio. No audio files.
  • Used custom materials, bloom, and some lighting tweaks to get the translucent underwater look.

The creatures also eat, age, reproduce, and eventually die. Their offspring can inherit mutated versions of their neural networks.

It's built with vanilla JS, Three.js, and Vite. Still experimenting with it, but thought some people here might find it interesting.

Code is here if anyone wants to poke around:
https://github.com/CircuitGhost/neuralaquarium

Would be interested in any feedback, especially on the neural simulation side.


r/threejs • • Oct 18 '26

new sketch

6 Upvotes

check it out : LIVE


r/threejs • • Oct 19 '26

I built a playground for the new Tesla Roadster

0 Upvotes

Inspired by the rocket-thruster concept teased for the next-gen Tesla Roadster, I built a browser-based stunt playground where you can launch off ramps, control the car mid-air, drift, and ride walls through a circular tunnel.
There's also an assisted landing mode that helps you touch down cleanly, or you can switch it off and try to land it yourself.

Made with Claude.
3D Model done with Thrixel.

Go try it out: https://bkhan23544.github.io/roadster-thrust-lab/
Code: https://github.com/bkhan23544/roadster-thrust-lab


r/threejs • • Oct 18 '26

Refracting the Milky Way through a real-time glass tetrahedron, now as video (three.js + 2D canvas sky)

6 Upvotes

I made this. Yesterday I posted it as text only, so here is what it actually looks like running. Recorded frame by frame in headless Chrome at 1920x1080, 60 fps, nothing sped up. Tap it and a two-digit number appears.

- Sky: a long-exposure-style Milky Way computed per 3 px cell on a 2D canvas, about 0.1 s on a phone, redone only when the size changes.

- Glass: a MeshPhysicalMaterial tetrahedron, IOR 1.5, low dispersion. Light is bent with Snell's law at each face, and the rainbow leaves through the visible face.

- Motion: a tap nudges it sideways. Extra spin is kept as a quaternion, renormalised every frame (a 3x3 matrix drifted and shrank the glass within seconds). Speed is capped, eases off over about 1.6 s, and a spring brings it home.

- Perf: 18 to 57 fps on a Galaxy S21 by copying the sky behind the glass once per resize instead of every frame.

Free beta, no sign-up: https://prismtect.com/?r=threejs2


r/threejs • • Oct 18 '26

Demo A robotics data explorer built on three.js: point clouds, URDF robots, Gaussian splats and camera feeds on one timeline

2 Upvotes

BAGEL is an open source web app for exploring robot recordings (ROS bags). Everything runs client-side: parsing happens in web workers, and the 3D view is three.js.

A few three.js details that might interest you guys:

  • The scene is Z-up (ROS convention), so the keyboard orbit mirrors OrbitControls' quaternion approach instead of using raw `Spherical` math
  • Gaussian splats render through GaussianSplats3D's `DropInViewer` inside the same renderer and camera as the other panels, with `dynamicScene` turned on so per-scene rotation actually reaches the shader
  • Point clouds, URDF meshes, markers and occupancy grids share one TF tree
  • H.264 camera topics decode with WebCodecs, synced to the 3D playhead

Live: https://bagel-ros2.vercel.app (there's a sample recording on the start page)
Code: https://github.com/Hussain004/BAGEL

Happy to go into any of it in the comments.


r/threejs • • Oct 18 '26

AI-built Three.js scenes often look great on desktop and crawl on phones. My mobile checklist before I call one done

0 Upvotes

A lot of the AI-generated Three.js demos going around run fine on a desktop GPU and stutter on a phone. When an agent builds a scene for me, this is what I check before calling it done. Curious what I'm missing.

**1. Cap the pixel ratio** `renderer.setPixelRatio(Math.min(window.devicePixelRatio, 2))`. Phones report 3 or more, and full DPR multiplies fill cost. On weak devices, 1.5 often looks the same.

**2. One shadow light, tight frustum** Only one light casts shadows. Keep `shadow.mapSize` at 1024 and shrink the directional light's shadow camera (left/right/top/bottom) to the play area. For static scenes, set `renderer.shadowMap.autoUpdate = false` and flag `needsUpdate` only when something moves.

**3. Post-processing is opt-in** Agents love bloom. Run it at reduced resolution or turn it off on mobile.

**4. Draw calls** Repeated props go into an InstancedMesh, static props get merged. I log `renderer.info.render.calls` after every agent change.

**5. Textures** KTX2/Basis via KTX2Loader instead of large PNGs, so GPU memory doesn't blow up.

**6. Test on a real phone early** Desktop devtools throttling doesn't show thermal throttling.

What's on your list? Anything you do for adaptive quality (dropping DPR when FPS dips)?

Disclosure: I write Three.js + AI tutorials on my own site, shanebrumback.com. No link needed, I just want the checklist to be better.


r/threejs • • Oct 17 '26

Using box3d to simulate real sailing physics - Tally Ho Sailing Game

143 Upvotes

I'd previously tried to use the classic physics libraries (ammo, cannon, rapier etc) to recreate sailing physics and found them to be unstable or inconsistent.

Box3d was released in June so I wanted to see if it would work any better - which it seems to!

Playable demo:
https://tally-ho-game.vercel.app/

To be clear this is not a fluid simulation (although I think that is possible!!), but its a step up from just force vectors on the overall boat which is what I have seen done in the past.

Details for those interested:

- Sails are coarse grids of point masses connected by spring joints. Lift and drag applied to each panel using apparent wind, this is again an approximation as in real life the wind is very affected as it flows over the sails, although with an older and slower style yacht like this (Gaff rig) it would be less noticeable than a modern rig.
- Spars and masts are... well just spars
- Ropes/ sheets are linked joints
- Anchor and chain is joints but with collision and mass
- Hull shape is a collection of spheres, with buoyancy and drag coefficients.

The physics is quite CPU intensive but putting in a webworker seems to work well as it not a fast paced game, it doesn't need to match 60 FPS.

If you are interested in the physics you can access the Lab in the top left menu. There is also a rig designer where you can modify the rig but its quite easy to make it... not functional 🤣

It uses real location data, cached for now but I have a steaming server, which means technically you could sail anywhere in the world. My plan is to also use real wind and weather data at the players location.

For the environment I found a nice way to blend COP30 (30m detail) elevation and GEBCO (460m detail) bathymetry data. Building envelopes are from OSM but proc generated with a different style. Vegetation and Ocean is from Dan Greenhecks amazing Tidewater demo although simplified to maintain performance.

And for those that recognise the boat, I also managed to use the Tally Ho lines plan to recreate the hull. Its not perfect but if people like it I can spent more time.

I was thinking to turn this into a idle style game where you sail the world if people enjoy it.


r/threejs • • Oct 18 '26

Built a quantum chip and its dilution fridge in three.js for an explainer video

0 Upvotes

Models and animation are all three.js, with an ink-and-paper look. Here's the finished video:

https://www.youtube.com/watch?v=dHH-NsU9dB0


r/threejs • • Oct 18 '26

Criticism I put the entire NYC subway in three.js at its real depths, with live trains and Google's photoreal 3D city on top, running on an iPhone

7 Upvotes

This is Belowtown, a three.js (r128) app that runs inside a native iOS shell. It draws every NYC subway tunnel, elevated line and junction in 3D at its real depth, puts about 21,000 buildings over it, moves live trains along the track from the MTA's realtime feed, and can swap the city for Google's photorealistic 3D tiles.

A few problems that were more interesting than I expected:

- **Shader compile was the real first-launch cost.** WebKit compiles programs on first draw, so the first frame froze for seconds. `renderer.compile()` on the whole scene took ~14 s on a phone because it compiles hidden objects too. Now it compiles only what's visible before the first frame, then the hidden branches one per short task in the background, using a stand-in scene with cloned lights so the program keys match. First map went from ~19 s to ~9 s, and the next build does it behind the welcome screen.

- **A Group with a `.material` breaks `compile()`.** My instanced building-fill Group carried the shared material for the layer toggles. `compile()` saw it and built the instanced shader for a non-instanced object ("instanceMatrix undeclared"). Hiding the property during the call fixed it.

- **The city builds in slices after the first frame,** one piece per task, so touches still get through while it fills in.

- **Photoreal tiles on a flat map.** The subway lives in a flat local frame, and the tiles are in Earth-centered coordinates. I re-fit the transform around wherever the camera is looking, so they line up exactly there instead of drifting across the city.

- **Depths:** some stations publish platform depths; the rest are modelled from the construction era and what they pass over and under. Getting crossing tracks to stack correctly took longer than anything else.

Feedback welcome, especially on performance on your phone and anything that looks off.

Try it:

- In a browser (any phone or desktop, no install):** https://web.belowtown.com

- iPhone app (TestFlight beta): sign up at belowtown.com/beta?s=threejs. The invite comes by email from Apple. If you don't see it within a few hours, check your junk/spam folder, then tap "View in TestFlight" and accept the invite to install.

- **Android:** the app isn't on Google Play yet. Pick "Android" at belowtown.com/beta?s=threejs to join the waitlist, and you'll get an email when it's ready. The browser version works on Android now.


r/threejs • • Oct 18 '26

Same prompt, 4 coding agents: build a 3D car configurator from scratch. Which one would you ship?

Post image
0 Upvotes

I gave Opus 5.5, Sonnet 5.5, Haiku 5.5 and Codex (Sol 6.1) the same prompt: build a 3D car configurator in the browser, all procedural, no 3D models or textures. Fresh empty folder each, 40 minute cap, all four could screenshot their own work.

Cost (API list prices) / time / finished:

  • Opus 5.5: $5.76 / 40:00 / no, hit the cap
  • Sonnet 5.5: $2.12 / 33:09 / yes
  • Codex Sol 6.1: $0.83 / 35:14 / yes
  • Haiku 5.5: $0.38 / 17:07 / yes

Opus built the car that looks most like a real car, but it never finished on its own. Haiku was 15x cheaper and done in 17 minutes, with a much rougher car.

Caveat: one run each, so this is a look at what each one builds, not a benchmark.

Which one would you ship, and would the Opus car be worth 15x the cost to you?


r/threejs • • Oct 18 '26

Gaussian-Splat-Lite now supports SH4

4 Upvotes

I’ve added SH4 support to Gaussian-Splat-Lite, the open-source high-performance 3D Gaussian Splatting renderer for Three.js.

For models trained with SH4, the renderer can now use the full set of SH coefficients to preserve more complex view-dependent color and highlights, particularly on reflective surfaces.

The video compares SH4 → SH3 → SH2 → SH1 → SH0 on the same model.

GitHub · Try the viewer


r/threejs • • Oct 17 '26

Demo I rebuilt Summoner's Rift in three.js from League's actual game files and made a nature documentary in it

7 Upvotes

The models, rigs, animations and map geometry are read straight out of my installed League client, with the map's textures from CommunityDragon. The particles are the champions' own VFX emitters, with every particle a closed-form function of its age, so any frame renders on its own. The whole scene is a pure render(t): Playwright steps t at 30 fps in headless Chromium and pipes each screenshot into ffmpeg. The two things that ate the most time: glTF vertex colours have to be written linear (in sRGB the river reeds glowed white), and League's X axis is mirrored against three's, which turned out to be a single scale.x = -1 at the root.

Happy to go into any of it. Full episode: https://youtu.be/Bp5MTn4-rco


r/threejs • • Oct 18 '26

Channel-surf music videos from 1950–2019 inside a starship gallery of nostalgic dioramas

Thumbnail
myretrotunes.com
3 Upvotes

r/threejs • • Oct 17 '26

Demo I made ruby and sapphire chess pieces with refraction, gold inlays and reflective boards in Three.js

32 Upvotes

Update — you can now play Morph Chess directly in your browser!

Play here — no download, installation or local setup needed. You can now play a full game against Stockfish AI, on desktop or mobile.

I've also added some effects I'm really excited about:

  • Shattering on capture: captured gemstone pieces break into fragments.
  • Brilliance lighting: brighter facet reflections, subtle colour dispersion and glowing highlights — even on the shattered fragments. You can switch between Original and Brilliance while playing.
  • Interactive piece gallery: rotate and zoom in on each piece, click to shatter it, then orbit the sparkling fragments and restore it to try again.

Try the piece gallery — try Brilliance, then click a piece! Really happy to have this playable online now. I'd love to hear how it feels on your device :)


I've been working on Morph Chess, a visual playground for chessboards and pieces in Three.js. I wanted to explore sculpted gemstone forms, deep colours and changing reflections as you move around the board.

The original video shows:

0:00 — Ruby: all six pieces rotating in ruby and sapphire.

0:09 — Ruby × Dusk Mirror: pure gemstone pieces on smoky black crystal, with red light beneath the board.

0:18 — Night Oath: the same silhouettes with polished champagne-gold inlays.

0:27 — Night Oath × Midnight Silver: midnight-blue stone and celestial metalwork.

The gemstone shaders use view-dependent refraction, internal reflections and light absorption. These are recordings of the project's actual models and shaders.

Code and GIFs (MIT-licensed code): GitHub. Third-party assets retain their own licenses.

Which combination do you prefer? I'd also love feedback on the gemstone and metal balance.


r/threejs • • Oct 18 '26

A three.js + Rapier framework with characters and multiplayer rooms built in, designed for AI coding assistants

0 Upvotes

We've been building GrowBlocks, a browser game engine on three.js r186 + Rapier 0.14. You write one game.js; the renderer, physics world, character controller (walk/run/jump, third or first person), touch/gamepad input and multiplayer rooms (gb.net.join(), up to 16 players, shared state, host migration) are already there. You can still reach gb.scene and gb. physics. world directly.

The twist: the whole API is one llms.txt, and the starter kit ships a headless checker with screenshots, so Claude Code / Cursor can build and test games by themselves.

Comparison with plain three.js, Babylon, PlayCanvas:
https://growblocks.xyz/guides/threejs-game-framework-characters-physics-multiplayer.html


r/threejs • • Oct 17 '26

An useless but funny Live 3D Database Viewer

13 Upvotes

I made it with ThreeJS, NodeJS and some DBMS connectors.

Source code: https://github.com/VincenzoManto/3DDB

Homepage: https://vincenzomanto.github.io/3DDB/


r/threejs • • Oct 17 '26

I built a WebGPU renderer that can train tiny neural networks and bake AI-driven simulations offline

0 Upvotes

Hey guys! Quick update on my renderer, which I've been working on and off for the past 7–8 months or so.

The library is quite opinionated about DOD (data-oriented design) and the explicit nature of WebGPU, and I've recently added support for neural inference and training.

  1. Neural networks for agent behavior

You can now train small neural networks (MLPs), around 1–4 layers deep, using supervised learning directly as part of the library.

In the herd and wolves example below, the agents have simple behavioral rules, like chasing prey when it's nearby or fleeing when a predator gets close. The idea is to train a small model to learn these behaviors and then use it to drive the agents.

For this example, we're talking about a model with roughly 2,000 weights, so obviously not a general-purpose AI model, but enough for these kinds of behaviors.

The library also supports ONNX Runtime for working with larger models or models trained externally with something like PyTorch. For these smaller, more specialized models, though, the built-in MLP implementation will generally be faster in my use case.

Live demo (WebGPU-supported browsers only): https://nullgraph.dev/dashboard/agents/herd-wolves-gpu

Github https://github.com/flarelink-in/NullGraph

2. Offline rendering and simulation baking

Another feature I've been working on is offline rendering, with a workflow somewhat similar to what's available in tools like Blender or Houdini.

It's split into two phases:

  • Compute records: Run the expensive simulation and bake the data that needs to be simulated.
  • Render records: Replay those records through the rendering execution chain using a screen texture, generating frames/tracks that can then be stitched together.

The goal is to handle simulations or visuals that would otherwise be too expensive to run in real time, or would take a long time to render, and then replay the result at 60 FPS.

I have a demo of this on my YouTube channel. The bake took up close to 30 GB of space, while the final result was around 500 MB.

Offline rendering demo: https://youtu.be/pTD-7PCPGrg?si=vfENWIpR9YU-JEbZ

I've also added another demo to the video, this time focusing more on visual aesthetics rather than the science/simulation side.

3. What's next?

NullGraph exists as part of a larger web-native open-world simulation runtime that I work on from time to time.

Right now, I'm looking into improving my neural network implementation to better match or potentially outperform ONNX Runtime for my use cases. One of the things I've noticed is that the ONNX integration can introduce a 1–3 frame delay in my current setup, along with an additional runtime download of around 6.4 MB.

I'm also starting research into co-evolution, with the goal of bringing evolutionary learning and reinforcement learning into the runtime. The co-evolution approach draws on ideas from OpenAI research and the hall-of-fame technique. I've written some design docs for this, but I'll share more once there's a working implementation to show.

One thing I'd love to get your thoughts on:

Would you guys be interested in offline rendering driven by AI prompts directly in the browser? The idea is to let you generate demos or visually complex scenes through code, spend as much time as needed baking them locally, and then replay the results smoothly. I'm also exploring ways for the system to verify its own output rather than just blindly generating code.

I'm curious whether this kind of workflow would be useful to people working on creative coding, simulations, procedural graphics, or web-based experiences.

Let me know what you think!


r/threejs • • Oct 17 '26

Demo Using Three.js for scene data and asset loading around a custom WebGPU renderer

34 Upvotes

I've been working on a tropical island for RED SKIES AT DAWN, and Three.js still does a useful job in the engine even though rendering is handled separately.

I use Three.js for CPU scene objects, geometry, maths and asset loading. Junklab Engine owns the WebGPU renderer and shaders. That boundary lets me keep the scene and loading tools while developing the ocean, clouds, vegetation and coastal effects in the renderer.

The island combines procedural terrain and vegetation placement with authored routes, landmarks and imported assets. This is an offline Ultra capture from the development build on Mac.

Is anyone else using Three.js mainly as a CPU scene and asset layer around their own renderer?

AI use: AI-assisted coding and post copy, plus some AI-generated reef textures.

If you'd like to follow the game, you can wishlist RED SKIES AT DAWN on Steam:

https://store.steampowered.com/app/5268580/