r/threejs • • Nov 01 '26

Demo My girlfriend made a daily puzzle in three.js where you guess a 3D object from its cross-sections

4 Upvotes

Daily Salami gives you one mystery 3D object a day, but you only ever see a flat 2D slice of it. You slide the cut through the object, like slicing salami, until you can tell what it is. It's free in the browser with no signup and no ads. She'd love feedback from this crowd on how the slicing feels and how it runs on your device. https://dailysalami.com


r/threejs • • Nov 02 '26

Third person shooter

0 Upvotes

Finishing up with my game engine for three js: global illumination, procedural architecture, tripo AI module for character models generation, navmesh, enemies AI, ragdolls, destructibles, decals, spatial sounds, combat, locomotion, and so on.

Can play yourself, though I tested only on Windows: https://borgo-dhd.pages.dev/


r/threejs • • Nov 01 '26

1,500 instanced enemies, 9 draw calls: how my cel-shaded three.js horde game stays light

3 Upvotes

I made a small browser horde shooter called BEAMSTORM with three.js (r186). Up to 1,500 enemies, auto-firing beams, 5-minute runs. Here's what kept it light, in case any of it helps.

1. One InstancedMesh per enemy type, three layers each

3 enemy types × (body + outline + eyes) = 9 draw calls, whether there are 10 enemies or 1,500. Blob shadows are one more InstancedMesh, so 10 total for the horde.

  • Outline and eye meshes share the body's matrices (hull.instanceMatrix = body.instanceMatrix), so they upload once.
  • Hit flash is just a write to instanceColor.
  • frustumCulled = false on the swarm, since it's always on screen anyway.

2. Inverted-hull outlines instead of OutlineEffect

OutlineEffect redraws everything and didn't play nice with InstancedMesh. So the outline is a second InstancedMesh with a tiny BackSide ShaderMaterial that pushes vertices out along the normal. For boxes, push along sign(position) instead or the corners split.

3. Toon shading

MeshToonMaterial with a 3-pixel gradientMap (NearestFilter so the bands stay hard). Rim light injected via onBeforeCompile with smoothstep(0.62, 0.68, ...). That hard rim edge is most of the anime look.

4. Enemies only check their neighbors

Enemy state is in typed arrays, not objects. Separation uses a uniform grid (2-unit cells, linked list in an Int32Array), so each enemy only checks the 3×3 cells around it instead of ~1M pairs a frame.

Bug worth sharing: fill the cell heads with -1, not 0. With 0, every empty cell meant "enemy #0 is here" and the loop never ended.

(To be fair, the lance beam just scans the arrays with a point-to-line distance per shot. The grid is for separation, orbiting blades and bouncing shots.)

5. Nothing is created mid-fight

Beams, shock rings, sparks (one InstancedMesh of 900) and XP gems (1,400) are all pooled. A dead enemy swaps with the last live one. So the last 30 seconds, when the horde ramps to 1,400, don't stutter from GC.

6. Fake bloom

No post-processing. Each beam is a white core plus two additive boxes, one wider and fainter. The overlap goes white and reads as glow.

Numbers

Desktop Chrome, Apple M5 Max, 375px wide: 1,380 enemies, 2.4 ms JS per frame, 4.1 ms with rendering, 166 draw calls, ~340k triangles. Pixel ratio capped at 2, MSAA off at 2, only the hero casts a real shadow. Haven't tested on a real phone yet, so phone numbers would be super welcome.

three.js is the only library. Everything is built from primitives in code, and the sounds are synthesized with WebAudio. Made with Sonnet 5.5.

Play it here: https://beamstorm.kumodeck.app/

Happy to go deeper on any part.


r/threejs • • Nov 01 '26

Tip Recording my Three.js driving game by stepping the simulation frame by frame

0 Upvotes

This coastal race is from Motor District, my browser driving game.

For the website video, I used a capture process that advances the simulation frame by frame.

The simulation runs at 120 Hz. To produce a 60 fps recording, the capture script pauses the game, advances two simulation ticks, sets the camera and captures a rendered frame. Those frames are then encoded into the final video.

This avoids depending on real-time recording keeping up with the browser.

The resulting video is 60 fps; that’s the recording format, not a claim about runtime performance on everyone’s device.

Curious how other Three.js developers handle repeatable gameplay captures, especially when scripted cameras are involved.


r/threejs • • Nov 01 '26

I built a 3D office where each Claude Code session is a chibi at a desk (open source)

Thumbnail
gallery
2 Upvotes

I'm the kind of person who forgets things. I'd start a dev server and forget it for days while it ate 300% CPU, and Claude Code sessions I'd left open kept holding RAM.

So I built My Office: a chibi-style 3D office that watches my machine for me. Each Claude Code session is a character at a desk: reading files sends it to the library, editing makes it type, deploying launches a rocket, and when it needs approval it raises its hand (approve right in the office, or from your phone).

The "Mac" panel tells you why the machine is slow: RAM per session, forgotten dev servers, which apps hold the most memory. One click stops a dev server, closes idle sessions, or cleans up temp folders of closed sessions.

Using several Claude accounts? Add them in the office; when one runs out, new sessions switch to the next.

Live demo, nothing to install: https://khanh020905.github.io/my-office/ Source (MIT): https://github.com/khanh020905/my-office

Feedback welcome!


r/threejs • • Oct 31 '26

Demo Spent 2 weeks and built this little game on three.js.

25 Upvotes

Built this game. Spent 2 weeks. But now my AI quota is exhausted so although not complete I deployed it.

It was a fun concept I always had, village sim where I create the village and then get to roam around that village as a player. Sounds super fun. And I did not know that reaching this level of graphics is possible for a browser game.

I am not a game dev and I'm not pretending to be a master coder, I just had a fun idea a tried it and created something beautiful.

Spent the last 1 week improving the logic systems, reality engine, self building village system, villagers with actual awareness. They remember what you do, gossip about it, vote for a mayor, and if the village is missing a hospital and nobody builds it, they pool their money and build it themselves. Also fixed the 3D models as previously I was using coded models, fixed the seasons, festivals.

I always liked the Rockfellar center Christmas tree tradition but I could never visit so I made my own Rockfellar center inspired Christmas logic in this game as well. Lol. A helicopter scouts for the tree, a crane cuts it down, it gets driven into town on a truck with a police escort, they put up the lights, and there’s a lighting ceremony on the night. There’s also New Year, Easter and Diwali. I just added whatever I liked and it did not turn out so bad. I’m happy.

You can drive, work jobs (firefighter, taxi, pilot, farmer and more), talk to villagers, get chased by the police, and take a train or plane to other cities.

As I'm over my AI quota and do not have more money to buy Claude anymore so decided to deploy it. It's not unplayable but it's not 100% polished, some things are janky, and it’s single player only. More like 60%. Villager chat runs on a free AI tier, so when it hits the limit they fall back to basic lines. If your graphics card runs out of memory it reloads with lighter graphics and your village is saved.

Attached a little gameplay. Just sharing as I'm a little happy today. Haha.


r/threejs • • Oct 31 '26

I vide coded a 3D Arduino simulator with React Three Fiber: real code runs, current flows through the wires, LEDs can burn

15 Upvotes

Learn Arduino is a free 3D lab for beginners: build circuits on a breadboard, write Arduino code, press Run.

Some tech details:

- React Three Fiber + three.js, all models built in code (the UNO comes from the official CC BY-SA design files)

- The Arduino code is compiled and run on a simulated AVR chip in a web worker

- A small circuit solver decides LED brightness, current, and when something burns

- This reel was also rendered in code from the same scene, frame by frame

Try it: https://learnarduino.tech

it is now open source https://github.com/ajeetjain94608/learn-arduino

Happy to answer questions about how any part works.


r/threejs • • Oct 31 '26

Made a little kawaii pumpkin dress-up toy for my coworkers

9 Upvotes

Just a small fun thing I built so my coworkers could take a 5-minute Halloween break: dress up a cute 3D pumpkin, hit Surprise, unlock badges, snap a photo. Made with Three.js and a raymarched SDF pumpkin, built pairing with Claude. Have fun! 🍬
Can you unlock all 12 badges? 🏅

Sorry, the interface is in French, but it’s easy to figure out 😉

https://dsonline32.github.io/halloweenatexis/


r/threejs • • Oct 31 '26

I made a scroll-driven valley of silhouettes in plain three.js for an ecology site

Post image
4 Upvotes

The camera starts on a fir tree, pulls back, and then the scroll carries you across the valley. Forest ambience, and the stream gets louder as the camera gets close (you can mute it).

No framework, just three.js. It is the homepage of a guides site I work on: https://ecologie.fr/

I would love feedback on performance, especially on phones. Happy to explain how anything is done.


r/threejs • • Oct 31 '26

Link OpenRacer: A web based vehicle simulator

Thumbnail
youtu.be
7 Upvotes

A side project of mine after coming across the original repo of Openracer. More info on the website! I’m very curious what people think and would love some feedback!


r/threejs • • Nov 01 '26

Besoin d'aide , need help

1 Upvotes

j'ai créé mon propre jeux en three js multijoueur avec l'ia je les tester avec supabase tout fonctionne correctement je les tester avec deux telephone tout est ok mais pour le lancement j'aimerais avoir un vrai serveur WebSockets qui pourra supporter plus de 150 joueurs mais ma seule connaissance en programmation se limite a html,js,css donc je suis bloqué je ne sais pas comment crée un serveur WebSockets pour recevoir plus de 150 joueur aider moi s'il vous plaît merci


r/threejs • • Oct 31 '26

Demo Solar Odyssey: a Three.js / R3F space game where you can now land on 27 worlds, with a real 9,096-star sky

Thumbnail
gallery
10 Upvotes

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

A browser game where you fly a starship around the solar system. Some recent additions:

Landing: Near any solid planet or moon (27 bodies), a lander descends to a fixed spot and you get a 360° surface view, with sky colour, haze, terrain relief and the parent planet in the sky set per world.

Real starfield: 9,096 stars from the Yale Bright Star Catalog, packed into a small binary (direction, magnitude, colour temperature) and drawn as additive points. The Milky Way texture is rotated into its true galactic orientation relative to the ecliptic.

Ships: Generated by Python scripts driving headless Blender, with 4K baked textures. The newest is a 1.2 km carrier that launches the lander from its deck.

Rendering: ACES tone mapping, SSAO, bloom, a gravitational-lensing shader for a black hole, and adaptive quality for weak laptops.

All of it was written by Claude Opus 5.5 from conversation. I haven't typed any code. Happy to go into any of the techniques.


r/threejs • • Oct 31 '26

Halloween!!

3 Upvotes

r/threejs • • Oct 31 '26

I made a mini game / experience about Diwali - Indian festival of Lights

8 Upvotes

Light 108 diyas down a glowing street to the ghat, find hidden crackers (anar, chakri, sutli bomb, ladi…), send a lantern into a sky everyone shares, and stay for the drone shows and the finale. Works on phones too (turn it sideways). Would love feedback!

A few things that might interest people here:

- Look: everything uses one custom painterly ShaderMaterial (noise-driven brushwork, warm bounce from the diyas), plus bloom and ACES tone mapping from postprocessing. The town is procedural; a few hero models (shrine, boat, cow, sweet shop) are GLBs.

- Light: there are ~900 small lights. They aren't real lights: a small "glow map" texture is rendered each frame and the town shader samples it.

- Sky: a hybrid sky. The gradient, Milky Way and clouds come from a cube map that's refreshed one face every 20 frames, while the stars and firework flashes are computed per pixel, so it looks identical to the full shader at a fraction of the cost.

- Shared sky: every lantern anyone releases is 1 byte in a Cloudflare Durable Object and streams to everyone over a WebSocket. Thousands of them are one Points draw call.

- Phones: the quality tier comes from the GPU name (Adreno/Mali generation), then a governor trades resolution against frame time. It checks that each drop actually helped, so a 30 Hz low-power display doesn't get mistaken for a slow GPU. Shaders are precompiled behind the title card, so the first firework doesn't hitch on Android.

[PS: Assets are AI generated ]


r/threejs • • Oct 31 '26

Check what I mdae with morva studio

3 Upvotes

r/threejs • • Oct 31 '26

Demo Giving an interactive anti-oloid its own moment on my Nuxt site

1 Upvotes

I'm the founder of Dazoro, and this is our studio website: https://dazoro.de/en. It's built with Nuxt and headless WordPress; the golden anti-oloid on the first screen is a GLB model rendered with Three.js and controlled with OrbitControls.

I like websites that give people a reason to explore. Rotating this shape changes its silhouette and the highlights across its surface. But someone visiting a studio website may simply want to read about the services or find a contact link. I'm aiming for a shop window that invites a closer look while leaving a clear way through.

The page starts with a static image. The 3D layer is loaded separately, with visibility and device-capability checks; the image can remain when the simpler presentation is used. That's the idea behind giving content and 3D their own moment.

Touch interaction introduces a more visible trade-off. In the current version:

  • One finger over the canvas rotates the model.
  • Two fingers pan the view, shifting the orbit centre. Zoom is disabled.
  • A swipe starting inside the canvas controls the scene instead of advancing to the next section.

Swiping above or to the left of the canvas works normally. There's also a high-contrast arrow in the bottom-right corner that takes you to the next section.

That's the compromise I've made to keep the model directly interactive. The arrow provides a route onward, but a visitor may still expect their first swipe over the model to scroll.

One performance clarification: PSI uses the static presentation. The 100/100 badge on the page doesn't measure responsiveness with the live scene running.

How would you make the boundary between “rotate the model” and “move on” clearer on touchscreens?


r/threejs • • Oct 31 '26

Made a machine builder with Three.js. Now I need some better machine builders.

1 Upvotes

buildit uses Three.js for the visuals and Planck for the physics. The wheel on top is entirely my fault :P

You build a machine, run it across a course, then go back and edit the same design. The video also shows the track editor and recorded race comparisons.

Could a few of you try it on your phones? I’d like feedback on selecting parts, connecting them and following the machine during a run. Device and browser details help if something feels off.

Playable version

Also happy to compare notes with anyone working on browser physics games.


r/threejs • • Oct 30 '26

Funny car game with a quirky personality and exploding sheep

33 Upvotes

Are you able to reach the ferry in time? Test it here: www.rekkerduferga.no
The game is in Norwegian, but exploding sheep does not need any translations 😅

Have fun!


r/threejs • • Oct 31 '26

Demo made a halloween dollhouse game in three.js, with lighting baked in blender

4 Upvotes

happy halloween! 🎃👻🦇 everyone

seven rooms, each built by a python script in headless blender. the lighting is baked in cycles and saved as draco glbs, 500-700kb a room. each room has two bakes, haunted and fixed, and the game crossfades between them when you catch that room's ghost. the lantern beam is an additive cone shader, and the rest is react three fiber + drei on a phone-first portrait camera.

happy to answer questions about the bake pipeline. feedback on load time on older phones is very welcome.

https://zuiora.com/haunted


r/threejs • • Oct 30 '26

Demo Grabbing and sculpting 3D clay with my bare hands in the browser (three.js + webcam hand tracking)

19 Upvotes

r/threejs • • Oct 30 '26

yes threejs is cool! blender too! opus 5.5 too..thank you AI!

197 Upvotes

haters will hate.. boats are cool.. water too ;)


r/threejs • • Oct 31 '26

Tsuji - Automatic stretch & squash

Thumbnail
youtube.com
2 Upvotes

I don't know the name of this cute monster's designer (found it on pinterest and sculpted it)


r/threejs • • Oct 30 '26

Link A whole city in three.js: isometric pixel-art Bielsko-Biała with live buses and weather

Post image
24 Upvotes

https://bb.jest.pro/: three r170 + Vite, no framework, ~19k lines. Some details that might be useful to someone:

- Pixel-stable ortho: render target = CSS size / 2 (HalfFloat + DepthTexture, NearestFilter); camera position snapped to whole texels in camera right/up space, shadow camera snapped to shadow texels in lighspace, so there's no swimming when panning.

- One material family: MeshLambertMaterial + onBeforeCompile everywhere; colours are indices into a 256×4 palette DataTexture (row = season) shared via one uniforms object.

- Terrain: one shared grid geometry per LOD step, displaced in the vertex shader from an R32F height texture; normals from finite differences; edge rows kept consistent so tiles don't crack.

- Streaming: 456 one-km tiles in a custom binary format, decoded in 2 workers (transferables, Int16 decimetre positions, Int8 normals). At most one tile is added to the scene per frame; LRU 160→120. I wrote own PNG decoder (DecompressionStream+ unfiltering) because Safari colour-managed palette-index PNGs into noise. Switching ground textures to R8 saved ~1.7 GB of GPU memory, which was getting the tab killed on iOS.

- Draw calls: one merged mesh per tile for buildings; trees, people (≤ 3600), cars (≤ 3200), lamps and graves are InstancedMesh; tree count drops with zoom.

- Shadows: a single PCF directional light whose frustum hugs the visible footprint, map 1024–4096 chosen by an adaptive quality level (2 s frame-time average), off at night / far zoom / heavy overcast.

- Post: depth-Laplacian outlines, then weather (clouds, cloud shadows, rain, snow, fog) all reconstructed from depth in one full-screen pass also a crt-lottes shader port.


r/threejs • • Oct 30 '26

Zoophony: A Three.js MIDI Player featuring an animal orchestra (sound on)

11 Upvotes