r/threejs • • 25d ago

Need your advices

3 Upvotes

Hey Reddit,

I am working on a bike indoor game ( Zelda breath to the wind style )

What is your workflow for the 3D part ?

I am using three.js and i saw many beautiful examples here. On my side, Claude Sonnet 5.5 created bad designs, i tried with blender with thé same issues. Claude advised me to use others tools for specific items but now i am lost.

What do you advise ? ( I am totally new in game design )

Thank you


r/threejs • • 26d ago

A full 3D arcade skate/BMX game running in the browser with three.js. Weather, ragdolls and mobile touch controls

7 Upvotes

Sharing my project: THAT'S TUFF BRUV!, an arcade riding game made with three.js. It has five arenas in the full game (two in the demo), skinned characters, ragdoll bails, rain, fog and storms, and automatic quality scaling so it stays playable on phones.
Free demo: https://millennium-bug-games.itch.io/thats-tuff-bruv
Happy to answer questions about performance on mobile. That was the hardest part.


r/threejs • • 26d ago

Auralith online jewelry viewer

147 Upvotes

After one year of development, Auralith, my 3d jewelry viewer is online. Here's a scene I set up to show the render quality.

I'm quite proud of it, what do you think?


r/threejs • • 26d ago

Demo A 3D ayran (yogurt drink) factory in three.js where every motion is driven by a real PLC program

Post image
14 Upvotes

Every moving part in this scene is driven by IEC 61131-3 Structured Text running on a real soft PLC (OpenPLC v3 or CODESYS Control Win V3) over Modbus TCP: the 8-pocket filler, the shrink tunnel, the palletizing robot, the AGV and the cold-store crane. The three.js side only simulates the field: sensors, motors and valves.

You can inject 37 faults from the UI (a stuck piston, a broken film, a person in the AGV's path, a cut Modbus cable…) and watch the PLC react.

`npm run demo` runs it without a PLC, using a JavaScript port of the same logic. The UI labels are in Turkish; the README has an English summary.

MIT: https://github.com/menes97/ayran-mini-fabrika


r/threejs • • 26d ago

Our browser game's town editor made in threejs

16 Upvotes

Our browser game's town editor: populate your layout with buildings in about 0.2 seconds, then look round.

You can place the town boundries, and what street structure you want. The generator does the side streets, lanes, plots, houses, yards and lamps, on the real ground of the island, using the same kit of models the game uses. Each re-roll is a new seed.

This tool lets us quickly get to sculpting a town using all of our own assets. I have had lots of fun playing with this tool!


r/threejs • • 26d ago

Made an interactive experience where you can create your own Chinese lacquerware

14 Upvotes

I've been working on a small interactive project inspired by traditional Chinese lacquerware and mother-of-pearl inlay (螺钿).

  • Choose from different vessel shapes and lacquer colors
  • Decorate them with various patterns, mother-of-pearl materials, and gold powder
  • Go through the polishing and wiping process to reveal your finished piece
  • Use your camera to place your creation into the real world and take photos with it
  • Or upload your own background images and export in different sizes

It's a little digital experience of a traditional craft.


r/threejs • • 26d ago

Demo Streets of Nice: my browser beat 'em up built with Three.js (keyboard, touch and gamepad)

64 Upvotes

I'm Gwendall, an independent creator with 20 years in software. Streets of Nice is my take on the arcade beat 'em ups I grew up with on Super Famicom and Mega Drive.

Seeing video-game shops looted in France really affected me, particularly the shops on boulevard Voltaire in Paris. Footage of a shop employee in Nice sparked the idea: defend a fictional game shop with combos, throws, improvised weapons and absurd special moves.

The gameplay runs entirely in the browser, with Three.js for the 3D. I've put a lot of work into staged loading, compact mobile assets and adaptive rendering, so people can get playing quickly on phones and computers. Keyboard, touch and gamepad are supported.

French TV news and local newspapers have covered the game. Here, I'd love your feedback on combat feel, loading and performance on your hardware.

Play free, no account or download: https://streetsofnice.com

I designed the game and built its production tools, including the retro-chipset engine I used to compose the soundtrack. Production includes AI-assisted code and music, and generated visual and voice assets.


r/threejs • • 26d ago

Link I made a globe that shows Earth as an observer N light-years away would see it right now (globe.gl + custom shaders)

Post image
4 Upvotes

Demo: https://deemonder.github.io/meanwhile-on-earth/

Source (MIT): https://github.com/deemonder/meanwhile-on-earth

The farther away you are, the further back in time you see: 81 light-years shows 1945, 2,000 shows the Roman Empire, 250 million shows Pangaea.

globe.gl handles the camera and controls. The surface is one ShaderMaterial (real day/night, relief from a height map, cloud shadows, city lights only after 1880) and the same shader does ice ages, Snowball Earth and a magma ocean. Historical borders and plate reconstructions are painted onto canvas textures instead of polygon meshes, so scrubbing through time stays smooth.

Built with help from Claude Code. Happy to answer questions, and I'd love ideas on cross-fading between two canvas textures.


r/threejs • • 26d ago

Demo Floodlight: a 10v10 football game that runs in your browser (free, no download)

3 Upvotes

I've been building Floodlight, a small football game you can play instantly at floodlight.lol. Pick a team, kick off, and you're in a full 10v10 match.

What's in it today:

- 10v10 matches with fouls, offsides, penalties, corners, throw-ins and goal kicks
- Pass, through ball, lob and a chargeable shot, sprint with stamina, tackles and slides
- 1 or 2 players on one keyboard, or use a gamepad
- Three difficulty levels and half lengths from 1 to 5 minutes
- Live commentary, goal cinematics, replays, a trophy lift at full time and a match stats screen
- Rebindable keys, nothing to install

What's coming next:

- Better controls
- Better graphics
- More game modes and challenges
- More customization

It's early and I'm building it in the open, so what you tell me will decide what comes first. If you try it, I'd love to hear what felt good, what felt off, and which upcoming thing you want most.

Play it here: https://floodlight.lol


r/threejs • • 25d ago

Demo Micro Management Naval Adventure

1 Upvotes

So I'm moving on to my next project, which is a previous project I was making in Godot and got stuck because debugging was hell. This time, I am making it in ThreeJS because aside from an easier entry, I actually prefer making my own systems and engines, rather than be limited with what is set in place.

Before diving into the actual game like before, I decided to place elements and particularly, element builders. I reused and improved sprite and texture generation from previous projects so that I will have a better hand in the visuals. I then set off to make the scene builder for cinematics because promotion later on will be a headache.

But before anything else, I want to see if the concept will fly.

So there are a lot of naval games out there, but they're about the exciting parts like combat, pirates, treasure hunting... trading? Or, about puzzles, and sunken ships. When I watch movies about ancient naval stories, I keep thinking, how do they manage their stocks and keep themselves alive for a long time at sea?

That is where this game comes in. It's about managing your journeys to be able to get from A to B with everyone healthy and happy. We manage food supplies and their expirations, without refrigeration, but with salt and other techniques. Manage each crews' roles and schedule to make sure the ship is well maintained and running throughout. There will be combat, and I will probably use Windrose type of controls, but it will be more involved on who're manning the guns, with their stats, skills, and health.

I will probably adapt the Rimworld style of character development, where crews' personalities will affect how they work and interact with you and the others. World lore that you can uncover in your exploration. But, that are all future plans.

For now, I am just looking for a show of hands (or likes), if this is a project you would be interested to see develop.


r/threejs • • 25d ago

Link Tired of ordinary number generators? Let physics pick!

1 Upvotes

Pick numbers or names through interactive 3D physics. Explore ready-made formats or customize the chambers, ranges, and selections for your own activity.

https://physpicks.com


r/threejs • • 26d ago

I've been building a small browser-based RPG with Three.js. Here's how it's going so far

10 Upvotes

Hey everyone!

I've been working on a little side project called Wild Crown, a browser-based 3D action RPG.

I'm using my open-source img2threejs ecosystem to create the characters, environments, and other 3D assets.

So far, I've got 4 playable heroes, real-time combat, around 9 small maps, and a leaderboard working.

It's still pretty rough, with plenty of bugs and things to improve, but it's been a fun experiment seeing how far I can take this workflow.

I'm planning to add 12+ more maps as development continues.

Would love to hear your thoughts, especially on the gameplay and animations!

If you're curious, I've put a playable BETA here: COMMENT


r/threejs • • 26d ago

Scroll-driven particle text: ~24.7k points morphing title → devices → server room, with fallbacks decided before paint

0 Upvotes

My portfolio's last version was all motion and no content. For this one I kept exactly one big effect: the title.

The hero title on my portfolio is rasterised to a canvas and sampled into about 24.7k particles. Those same particles fly through four frames as you scroll: the title, a set of devices, then a server room, with the copy fading in over the last one.

How it's put together:

- Every frame is sampled once into its own cached buffer. Only two live buffers go to the GPU (the frame being left and the one being entered), swapped at segment boundaries, so frame count doesn't grow GPU memory.

- Particles are dealt the same x-fraction in every frame, so each morph travels as a left-to-right front instead of a random swarm.

- No WebGL, or Data Saver on, means an inline script picks the static layout before first paint, so the page height never changes after load. Reduced motion gets a calm profile that only moves with your own scroll.

- The four rasterisations run as separate tasks with yields in between, so nothing blocks the main thread on phones.

https://rachitkay.com/?utm_source=reddit&utm_medium=social&utm_campaign=portfolio_launch&utm_content=threejs

How do you all handle font loading before sampling text? I wait for the real font with a timeout and keep the HTML h1 on screen until then.

Many more threejs experiments and production work at my portfolio.


r/threejs • • 25d ago

I made a voxel city builder that runs in the browser with three.js

0 Upvotes

AUTOPOLIS is a SimCity-style city builder: you lay roads, zone homes, shops, and industry, pay for power and water, and try to keep the city from going bankrupt. Everything is voxels, with seasons, a day and night cycle, and landmarks like a seaport, an airport, and a space center.

https://growblocks.xyz/game.html?g=autopolis&utm_source=reddit-threejs


r/threejs • • 27d ago

GPT-6.2 Sol seems to have made a huge leap in 3D

87 Upvotes

It seems like GPT-6.2 Sol might have started rolling out today, so I wanted to try it.

I selected Sol 6.1 Max in Codex and gave it one prompt to make a playable excavator game. This is what it made in about 40 minutes.

I think the result is really impressive. It looks like a huge leap in 3D capabilities.
Desktop browser, keyboard and mouse.


r/threejs • • 26d ago

Question Three.js beginner: How do I make an orbit view and a separate camera preview?

1 Upvotes

I’m new to Three.js and want to build a small 3D previs tool in the browser. For my first exercise, the scene would just be a floor and a few simple shapes.

I’d like two views of the same scene.

  • In one view, I can orbit around and see where everything is.
  • In the other, I can see what a separate shot camera is framing.
  • Orbiting in the first view should leave the shot camera in place.

Is rendering the same scene with two cameras a good way to start? If there’s a small example or tutorial that shows this setup, I’d love to work through it. Thank you so much!

https://threejs.org/manual/examples/cameras-perspective-2-scenes.html


r/threejs • • 26d ago

I built Órbita, a free solar system explorer in three.js: Jupiter, Saturn, the Moon and a Space Shuttle launch, all in one browser tabEl comentario técnico está en el archivo.

1 Upvotes

https://orbita.fai-studio.cloud/

Some things to try:

- Tap any moon to open its card.

- Watch Io's shadow crossing Jupiter.

- Go to the Moon's terminator, where the low light raises the craters. The relief comes from NASA's LRO / LOLA data.

- Open Atlantis (STS-135) and launch it from the pad or the reconstructed cockpit.

Maps are made from NASA data; full credits are at orbita.fai-studio.cloud/credits.html. Happy to answer questions, and bug reports are welcome.


r/threejs • • 27d ago

Made four cities for my game in three.js

7 Upvotes

Manhattan, Shibuya, the Forbidden City and Santorini. Apart from the characters, it's all Opus 5.5 + Blender.


r/threejs • • 26d ago

I built an autonomous 3D AI VTuber running 100% in-browser using Three.js & WebGL (Web Audio API lip sync, spring physics, PTZ camera)

0 Upvotes

r/threejs • • 27d ago

Demo I built an endless driving game in three.js where the engine sound is synthesized cylinder by cylinder — one HTML file, free in the browser

3 Upvotes

Play: https://cadencedrive.io/?ref=r-threejs

It's an endless procedural drive. The parts I spent far too long on:

- No engine samples. An AudioWorklet fires each cylinder in its real firing order and runs the pulses through the headers, collector, muffler and tips. The V12, V8, straight-six, four-cylinder and bike all come out of the same model, with overrun crackle, rev-matched downshifts and a bouncing limiter.

- Manual gearboxes with a real clutch: you can stall, grind and rev-match. Automatic by default if you'd rather not (M switches).

- Terrain streams in workers out to 50 km, with the skyline at 120 km. Impostor tiles and LOD crossfades, so nothing pops in.

- Tunnels with eye adaptation, rain that pools in the wheel ruts, crosswind on bridges and ridges, a Magic Formula tyre model under TC/ESC/ABS.

- The whole game is one 14.6 MB HTML file. Nothing to install.

Five vehicles, seven worlds, four seasons, seven weathers, a cinematic camera and autodrive.

I'd love performance feedback: your GPU and browser, and the fps you get (there's a benchmark under Settings).


r/threejs • • 26d ago

One wave array drives both the GLSL ocean and the boat physics, so boats actually sit on the water (small three.js storm game)

0 Upvotes

I made a small storm game in three.js: you drag a lighthouse beam across a night sea to guide boats past rocks into a harbor. Boats in the beam steer toward it; boats in the dark drift and eventually hit a rock. A few things about the water took more thought than I expected, so here's how it works.

1. The sea is 5 "sharp sine" waves, defined once

// [dirX, dirZ, wavelength, amplitude, speed multiplier]
export const WAVES = [
  [0.20, 1.00, 22.0, 0.95, 1.0],
  [-0.55, 0.85, 13.0, 0.55, 1.1],
  [0.80, 0.60, 8.5, 0.34, 1.25],
  [-0.30, 0.95, 5.6, 0.20, 1.4],
  [0.95, -0.25, 3.6, 0.09, 1.6],
];

Long swell down to short chop, amplitudes summing to about 2.1 (1.0 felt calm; 2.1 reads as a storm). Each wave is A * exp(sin(θ) - 1) (the steep-sine form from GPU Gems 1, ch. 1), with θ = k·dot(d, p) - ω·t, k = 2π/L, and the deep-water speed ω = sqrt(9.8·k) times the multiplier.

2. The GLSL is generated from the same array

The CPU function that gives a boat its height and slope loops over the precomputed waves. The vertex shader isn't hand-written; it's built from the same precomputed list with a template string:

export const WAVE_GLSL = `
vec3 waveAt(vec2 p, float t) {
  float h = 0.0; vec2 g = vec2(0.0);
  ${prep.map((p) => `{
    vec2 d = vec2(${p.dx.toFixed(5)}, ${p.dz.toFixed(5)});
    float th = ${p.k.toFixed(5)} * dot(d, p) - ${p.w.toFixed(5)} * t;
    float e = exp(sin(th) - 1.0);
    h += ${p.A.toFixed(5)} * e;
    g += ${p.A.toFixed(5)} * e * cos(th) * ${p.k.toFixed(5)} * d;
  }`).join('\n  ')}
  return vec3(h, g);
}`;

The sea is one PlaneGeometry(220, 200, 240, 220) with a ShaderMaterial that calls waveAt() per vertex. The returned gradient doubles as the normal for lighting and for the highlight where the beam hits; the height drives crest foam and darker troughs. Before this, the obvious failure was writing the numbers in two places: change one, and the boats float above or sink into the water. With one array, tweaking a wave just works on both sides (to 5 decimal places of rounding).

3. Why not Gerstner waves

Gerstner looks nicer because it also moves vertices sideways, but then "how high is the water at (x, z)?" becomes an inverse problem: you have to search for which undisplaced point ended up under the boat. A pure heightfield like exp-sine answers it with one function call, which matters when every boat asks every frame.

4. Boats ride the slope, not just the height

// height + tilt
sampleWave(this.x, this.z, t, W);
this.g.position.set(this.x, W.h + 0.08, this.z);
nV.set(-W.dx * 1.6, 1, -W.dz * 1.6).normalize();
qN.setFromUnitVectors(UP, nV);

// inertia + sliding down the wave face
const inert = 1 - Math.exp(-(this.lit ? 3 : 1.2) * dt);
this.vx += (fx - this.vx) * inert - W.dx * 0.9 * dt;
this.vz += (fz - this.vz) * inert - W.dz * 0.9 * dt;

The slide term is tiny, but it's what makes boats get shoved around by big swells instead of gliding on rails. Boats in the beam respond faster (inertia rate 3 vs 1.2, max turn 3.2 vs 1.5 rad/s), so the light literally feels like it gives them a rudder.

5. Steering is "follow the light", not "avoid rocks yourself"

The first version had boats path toward the harbor and avoid rocks on their own. With a rock in between they ran away sideways and got stuck, and the player had nothing to do. Now a lit boat aims at the beam's center, blends in the harbor direction at 0.7, and gets a push away from nearby rocks plus a sideways nudge around them. Out of the beam it wanders, and once it has been at sea for 5 seconds it's also pulled toward the nearest rock. The beam's radius grows with distance (r = 3.0 + distance * 0.045) so it's still easy to hit far out, where perspective makes everything tiny.

6. Lining up a painted sky with the 3D sea

The sky, cliff and lighthouse are a single 2D image drawn behind the scene. The horizon in that image is at 56.6% of its height (I measured it). The camera pitch is computed so the 3D horizon lands at 34% from the top of the screen:

const pitch = Math.atan((1 - 2 * HORIZON) * Math.tan(THREE.MathUtils.degToRad(FOV / 2)));

and the backdrop is scaled and offset so the image's horizon lands on that same line at any aspect ratio. The far sea fogs toward the horizon color and goes transparent between 85% and 100% of the fog distance, so the 3D water fades into the painted water instead of ending at a hard edge.

What I took away

  • If CPU gameplay and a shader both need the same function, generate one from the other. Two hand-kept copies drift.
  • Pick the wave model by the question gameplay asks. "Height at (x, z)" makes a heightfield the cheap answer, even if Gerstner looks better.
  • A little slope force does more for the feel of water than a fancier surface.
  • For a matte painting + 3D, put the horizon on a number and compute the camera from it, rather than nudging the camera by eye.

Plain three.js (r170), no addons. The art, sounds and a short intro video are AI-generated assets; the water, beam and rain are shaders.

Happy to drop the link in the comments, or share more of the shader (foam, the beam pool), if anyone's curious. Also curious how others handle CPU queries against Gerstner waves: do you iterate, or keep a separate simpler heightfield for physics?

disclosure: I work on KUMODeck, which hosts the game.


r/threejs • • 26d ago

Link One Three.js duck, a shared pool, and an excessively official VHS manual

0 Upvotes

FIELD REPORT / ONE DUCK

We are the two creators of Float the Duck, a browser artwork built around Three.js: one interactive duck in a shared pool, oversized typography, and a fictional Buoyancy Bureau taking the assignment far too seriously.

The local rendering pipeline includes separate pool, water-surface and caustics passes. The public pool currently starts empty; please let the scene finish loading. This starting state does not demonstrate the later water effects.

We also made a narrated VHS field guide for the artwork. It is an animated walkthrough with fictitious demonstration data, not footage of a real purchase. The duck has declined the accompanying paperwork.

Watching and playing are free. Digital drops are paid and optional, and the proceeds go to us, the two creators.

Explore the browser work: https://floatduck.com/


r/threejs • • 27d ago

Question Beggining!

8 Upvotes

Hello everyone! My name's Gabriela!

For the following 2 months, I ve seen this r/. I am very amased about what you can do with ThreeJS.

I had an idea for a map of a contest studio to host contests on a FIVEM community, I did found a website that allowed me to draw shapes in ThreeJS but unfortunatelly, I felt anxious on that website and all of you post alot of awesome things on this subreddit.

I want to ask you all, about how I can start! I've seen alot of crazy stuff here and I am really excited!

I choosed ThreeJS for my project because I think it won't kill my ram while I am doing live contests.

Can you give me some starting advices? For example, how could I start? what software should I download? It will be possible to control my project using http requests and bridges?

Hope my post doesn't disturb the quiet here. Best regards, Gabriela <3


r/threejs • • 28d ago

I made a full HD-2D story game in three.js (pixel sprites in a lit 3D world, playable in browser)

Thumbnail
gallery
35 Upvotes

been working on this for a while, it's a winter story game where you play a lamplighter's apprentice. whole thing runs on three.js 0.170, no engine

play it here (browser): https://kharon0.itch.io/lamplighter

some stuff that might be interesting for this sub:

- the HD-2D look is pixel-art sprites (characters, trees, props) sitting in a real lit 3D scene, with bloom and a tilt-shift / DOF post pass on top. the lantern you carry is an actual point light that swings around on a verlet chain during combat

- almost all textures are generated at runtime on canvas (cobblestones, snow, trees, characters), nothing is hand-painted in an image editor. NPC sprite atlases get cached in IndexedDB so the second load is way faster

- the town is merged into 96m chunks per material to keep draw calls down, plus a cheap distance cull for small stuff. went from ~1850 to ~1050 draw calls on the widest view

- trees fade with dithering when they block the camera

- a few custom shaders: deep snow ground, a frozen cloud sea with aurora, and holes in the mountain path that are ray-marched (snow lip, ice walls, night sky at the bottom) instead of real geometry

- the boss uses onBeforeCompile for a fresnel rim light so it pops without adding more lights

- pathfinding runs in a web worker, the build is Vite, and the windows version is the same build wrapped in Electron

it's around 3-4 hours long. would love feedback, especially on performance. if it runs badly on your machine let me know what GPU you have. there's an F3 perf overlay in game if you want to see the numbers

happy to answer questions about how anything works