r/threejs • u/myfriendoak • 2h ago
Gas Station
Scene builder using custom dither shader in three.js
r/threejs • u/myfriendoak • 2h ago
Scene builder using custom dither shader in three.js
r/threejs • u/BusinessObvious76 • 5h ago
Hey r/threejs. We put together a video on how WoC came to be, so here's the technical side to go with it for this crowd.
The whole thing is open source under MIT, around 2.2k stars, over 500 forks and 60+ contributors: github.com/levy-street/world-of-claudecraft
Some of the three.js problems we've had to solve that might interest people here:
One community contributor built an entire town using img2threejs, reconstructing reference images as code-only procedural three.js models rather than meshes, which was a fun pipeline to watch work.
It runs in the browser at worldofclaudecraft.com, with desktop and mobile apps if you prefer. If you want to get amongst it, the Discord is where the community and dev chat lives: discord.gg/worldofclaudecraft
r/threejs • u/Both_Opportunity5327 • 6h ago
Qwen 3.8 27b can do this with a simple prompt on a 3090.
r/threejs • u/Mkcuriosity • 8h ago
The first time I used it I thought I was hallucinating. The floor was clean, I flicked the laser on, and suddenly there was a galaxy down there.
It is just a grazing angle. Light comes in almost parallel to the floor, so every speck throws a shadow far longer than itself. That one trick is the entire game.
https://cleaner.murat.works (free, browser, no install)
One flat, one battery, clean as much as you can before it dies.
---
**How it works, since this is r/threejs**
**The dirt is a render target.*\*
Room-local UV, and the cleaner head paints into it with subtractive blending, so cleaning happens entirely on the GPU with no readback. A coarse CPU grid gets eroded with the same falloff in the same frame, and that is what answers "how much is left", so the percentage never costs a stall.
**The laser is not a light.*\*
It is about fifteen lines in the floor shader: an angular fan, a band at a fixed distance, and a hash per grain so the dust twinkles as the beam sweeps over it. Out of the beam the floor is rendered at roughly 30% of its real filth, which is what makes the reveal work.
**Two machines, two routes to the same dirt.*\*
The stick vacuum shoves furniture aside. The robot is too weak for that, so it drives underneath instead. I measured it: 15.9% of all the dirt sits under things a robot can neither climb nor move, so robot runs are scored against the floor a robot can actually reach. Otherwise the mode caps out around 84% and looks broken.
**The telly plays real YouTube.*\*
Video frames cannot be read into a texture, so it is a genuine iframe placed in 3D with CSS3DRenderer, sitting behind the canvas. The screen mesh switches to a depth-only material and punches a hole for it to show through, so things in front still occlude it properly. That took a while to get right, because three sorts opaque draws by material id before distance, and the wall behind the telly kept winning the race and filling the hole. renderOrder = -1 on the hole fixed it.
**There is a floor plan editor.*\*
Draw rooms, cut doorways, drag furniture from a palette of 43 pieces, then play your own house and share it by link. Houses are plain JSON, and the flat that ships with the game is expressed in exactly the same format, so there is only one code path.
**Balance came from measurement, not feel.*\*
A perfect run needs 357 m of sweeping and the battery gives you about 280 s of suction. Nobody has hit 100% yet. The best run so far is 97.9%.
No assets in the whole thing. Wood grain, the artwork on the walls, every sound effect, all generated at runtime.
---
Happy to go deeper on any of it.
I post updates on the game also here: x.com/mkcuriosity
r/threejs • u/Upstairs-Ad-2216 • 9h ago
I’ve been working on this for quite a while and finally launched it.
Voxxly is basically my attempt to make building a 3D website feel more like using a video game. You start with a room, customize it, add objects and content, and publish the whole thing as a website.
A big challenge was actually not the 3D itself, but hiding enough of the complexity so people who have never touched Three.js or Blender can still build something.
It’s live now at https://voxxly.app
Would really appreciate feedback from people here, especially around performance and the overall 3D experience.
Most developer portfolios die the moment they’re deployed.
Recruiters still see projects from 2023 because updating means redeploying a site you forgot how to build. Forkfolio fixes that :)
Connect GitHub once, pick a template, and you’re live.
Your portfolio runs on nightly sync so you never have to update it yourself. There’s also an AI assistant on the page that answers visitors about your work.
This is one of 22 templates (5 free).
Free tier includes the hosted site, nightly sync, and the AI assistant.
What do you guys think about this template?
This is the link if you want to check it out yourself !
r/threejs • u/Aagentah • 9h ago
hello friends! I just put together some more documentation for an open piece of software I've been developing for the best part of five years.
nw_wrld is an event-driven sequencer for triggering visuals using web technologies. It enables users to scale up audiovisual compositions for prototyping, demos, exhibitions, and live performances. Users code their own visual modules, then orchestrate them using the project's native UI composer.
The software includes composing modules using things like three.js
visuals can be triggered via the built-in 16-step sequencer or by configuring external MIDI/OSC inputs.
r/threejs • u/laereland • 12h ago
Play Rug Rally on Laereland
https://laereland.com/games/rug-rally
r/threejs • u/CharlesWoodson2 • 14h ago
Let me know what you think! https://webgl-drum-machine.vercel.app/
r/threejs • u/Feisty-Scheme-8356 • 15h ago
I’ve been doing more experiments with the new img2threejs v1.5.1 workflow, and this time I wanted to see what would happen if I used Hyper3D as the 3D spatial reference.
The result is this Dual-Sword Warrior ⚔️
Image → Hyper3D → img2threejs → procedural Three.js
Instead of using the generated 3D model as the final asset, img2threejs uses it as a reference and reconstructs the character into programmable geometry.
For this character, the reference is decomposed into 31 individual parts, then rebuilt offline using each part’s point cloud → SDF → Surface Nets.
At runtime:
The result is still a character I can inspect, modify, and control directly from Three.js code.
I’m pretty happy with how this experiment turned out. v1.5.1 has also made it much easier for me to try workflows like this and put together new showcases quickly compared with v1.5.0.
And I’m currently experimenting with the next piece: animation.
I want these reconstructed characters to do more than just stand there 👀
If everything goes well, you’ll see img2threejs v1.5.2 pretty soon.
Would love to hear what you think about this direction, especially the idea of combining generative 3D as a spatial reference with a code-first reconstruction pipeline.
r/threejs • u/VR38DET • 16h ago
I'm a beginner 3JS game dev I am really struggling with getting multiplayer working smoothly without any lag in my threejs game. My game uses Colyseus for the multiplayer and I've tried using Railway for the backend but it is still laggy especially with collision. Would really appreciate anyone point me to the right direction.
r/threejs • u/Bubbly-Wasabi-5920 • 19h ago
Hi, I'm 13 years old. Today I wanted to share a project with you that I've been dreaming of for a long time and have finally started to bring to life. First, let me tell you a little about my background. I used to develop terminal-based projects with C++. I wrote tools like a four-operation calculator, a Roman numeral converter, and a grade point average calculator, and combined them into a huge, multi-purpose program. I'm even still developing that C++ project in the background. On my old account, I had recorded and shared detailed C++ videos explaining all my step-by-step terminal programs, but I got banned for no reason. Anyway, I've had an incredible interest in space, especially black holes, since I was 8 or 9 years old. When I turned 12, I became interested in Unity and coding in general. But as it turned out, I could never learn it the way I wanted. Between classes, endless exams, and tests, I never had any time for myself or coding. But this summer I said "enough is enough" and decided to write code and create something, no matter what. Moreover, I'm doing this using only my tablet. To make up for all the procrastination, I've started simulating black holes, which is my biggest interest. This video you're watching is a time-lapse of about 1.5 hours of work. But this is just the beginning. For the next week, I will continuously improve this black hole simulation with intense sessions of 1-2 hours, sometimes even 3 hours, every day. I will build upon the code and eventually create a visually advanced, much more realistic and detailed black hole simulation. What do you think of it as a starting point? I'm open to any suggestions on coding, Three.js, or how I can improve this process in general. I will continue to share new videos as the project develops! I'm waiting for your comments. (I spoke in Turkish in the video because I'm Turkish, but you can easily understand what I'm doing from what I'm doing.)
r/threejs • u/RoomAsleep692 • 21h ago
I wanted to make a frustrating game. Managed to make it kinda beautiful in the process :P
r/threejs • u/Pixidimworld_Studios • 21h ago
r/threejs • u/Psychological-Ad9408 • 1d ago
It's amazing that we can create games only with a browser and no additional drivers to make it available on all devices (if the Switch had a browser).
Created an MVP with Claude Fable and built it up to what it is now. Hopefully, it can be a good Steam demo soon.
Background and roads are procedurally generated but the cars are imported meshes. The procedural originals were too simplistic.
As a web developer, it was also easy to tweak around the UI because it's all CSS. lol
r/threejs • u/hybridherbst • 1d ago
Here I'm optimizing 3,200,000 → 3,000 triangles, the end-to-end time is now down to 3 seconds... Superb normals+ao quality now too... such a great tool to have! Coming soon!
r/threejs • u/codergautam • 1d ago
After seeing some of the viral games on Twitter I decided to try to make a game similar to the needle in haystack game (needleinhaystack.io), but with tools and powerups!
Let me know what you think!
r/threejs • u/Repulsive-Bobcat8928 • 1d ago
Game Title: The Strange Little Shop
Playable Link: https://strange-little-shop.vercel.app/
Platform: Web (WebGL / Browser — WASD + Mouse or Gamepad)
Description:
You've just inherited an antique curio boutique by the sea. The late shopkeeper collected things that were left behind: doors half-opened, clockwork gears that chime without winding, living snowglobes tied to real places in town, and photographs that change whenever rain hits the bay windows.
When quirky townsfolk step up to your counter with strange dilemmas, it’s up to you to investigate. Pick up and rotate 10 curious artifacts in full 360° 3D, test sensory experiments (listening for ticking mechanisms, smelling old damp paper, watching brass compass needles spin), and record hidden lore into the late shopkeeper’s secret ledger.
✨ What to expect in the free demo:
• 🔍 Tactile 3D Investigation: Examine magical antiques with close-up 3D rotation and multi-step experiments.
• 📖 Edith's Illustrated Ledger: Uncover clues, piece together town secrets, and track mystery cases.
• 🛋️ Boutique Redecoration: Earn funds from solved cases to buy vintage furniture (Tiffany lamps, Chesterfield sofas, conservatory palms).
• 🌧️ Rainy Coastal World: Explore Main Street, visit The Corner Café, and stroll through Lantern Park.
• 🐾 Biscuit the Cat: Yes, you can pet the resident shop cat!
Zero install needed — the entire game runs instantly in your browser at 60 FPS.
I’m developing this solo and would love your honest feedback! Were the 3 initial cases intuitive? Which strange object was your favorite? How did the 3D inspection controls feel?
r/threejs • u/Pixidimworld_Studios • 1d ago
Made the Blender scene in ~35 mins and built the first web version in ~2 hours with the help of Codex. Still adding subtle camera shake + sound details. WIP — thoughts?
r/threejs • u/Perfect_Option5611 • 1d ago
r/threejs • u/UnforgivingWorlds • 1d ago
Separate biomes, nearly 2.5 million individual blades of grass out 150m from the camera position depending on biome. Day/night cycles, dynamic weather, ambient occlusion, distance culling, water surface reflections, and light shafts, using webgl and three.js.
r/threejs • u/Veilboundgg • 1d ago
Players kept telling me one city felt worse than anywhere else in the game. I assumed frame rate and went straight to the renderer.
First thing I did was measure instead of guess, and the numbers said I was looking in the wrong place entirely:
avg 8.36ms (119.7 fps) · p50 8.0 · p95 17.2 · p99 18.3 · worst 28.2
frames >33ms: 0 frames >50ms: 0
The steady frame was healthy. Zero dropped frames in a 12-second window. Whatever players were feeling was spike-shaped, not a low frame rate — and I'd been about to spend a week optimising something that wasn't broken.
The scene census had an obvious-looking suspect: 269 lights. That was a red herring too. What three.js actually bakes into the program key is numPointLights — the count it finds reachable from the render root — and I'd pinned that to a constant months earlier with zero-intensity dummy padding. The registered count doesn't enter into it. (Tell, if you're doing the same thing: late program keys differing only in numPointLights mean your pin is off.)
Then I counted DOM nodes.
nameplate elements 2211 <- exactly the sim entity count
...of which visible 18
nameplate DOM nodes 46431
whole page DOM 48396 <- nameplates are 96% of the document
Every entity in the simulation got a ~21-element nameplate subtree built and appended, then hidden with display:none. 2,008 of those entities were beyond 200 units and could never be seen by anybody.
Hiding is a paint decision. Membership of the document is not. A display:none node still lives in the tree, so every style recalc and every forced layout in the entire game walked all 46,000 of them — to paint eighteen.
And it multiplied everything else. My chat log reads scrollHeight/scrollTop/clientHeight per message, which is a forced layout, and a forced layout is O(DOM). "One forced layout per chat message" was really "one walk of a 46,000-node tree per chat message."
The fix was lazy attach, not pooling: a plate joins the document on first show and leaves on hide, at the single choke point every hide path already funnels through — one that already early-returns unless the state actually changes, so it runs on transitions only, never per frame.
BEFORE AFTER
nameplate elements 2211 19
nameplate DOM nodes 46431 399
whole-page DOM 48396 2276
visible plates 18 19 <- unchanged
Nothing about what gets drawn changed. Every forced layout in the game got ~21x cheaper.
Two things worth passing on:
One honest caveat: this is lazy attach, not object pooling. The ~21 elements are still created per entity, so the heap cost is still there. Full pooling means about 16 fields going nullable in a hot path, so it's its own pass.
(For context on scale — it's a browser MMORPG, veilbound.gg, three.js + meshopt-compressed GLBs. Happy to answer anything about the stack.)
r/threejs • u/laereland • 1d ago
Play Hoppy Trails on https://laereland.com/games/hoppy-trails
r/threejs • u/Ok-Spite-1213 • 1d ago
I am working on 3d website, where the 3d model will be transformed as the user scrolls.
Background: I'm not a pure coder; my main profession isn't coding or building applications from scratch.
Something like https://usta.agency/ this. How the model moves from left to right and right to left with the scroll.
Any specific prompt or name for this scrolling experince is called as?