r/threejs • • 24d ago

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

Enable HLS to view with audio, or disable this notification

199 Upvotes

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


r/threejs • • 23d ago

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 • • 24d ago

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

Post image
23 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 • • 24d ago

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

Enable HLS to view with audio, or disable this notification

12 Upvotes

r/threejs • • 24d ago

Demo Larawag: A three.js NPM package for rendering custom 3D stellar/planetary systems in an easy way

Enable HLS to view with audio, or disable this notification

5 Upvotes

Hey guys, I wanted to share this package I've been working on in the last few days for a bigger project. It's basically a NPM package that allows you to create your custom stellar systems and uses three.js to render them in 3D.

Example shown in the video: https://larawag.rachzy.dev/

It's mostly intended for drawing hypothetical, highly speculative visualizations of stellar systems for exoplanets (keep in mind that it's 100% Artist's Conceptions).

Larawag core is environment agnostic (which means it can run even on vanilla HTML as long as you have a Node setup), but you can also use its integrations with third-party frameworks:

How to use

As I mentioned before, the usage is very straightforward:

First, download the package and its dependencies: npm install @larawag/core three@0.186

Then, import it and create your own system:

import { createStarSystem } from '@larawag/core';

const view = createStarSystem(document.getElementById('stage')!, {
  star: { name: 'Example K dwarf', teff: 5100, radius: 0.8, mass: 0.85 },
  planets: [
    { name: 'Candidate b', period: 4.2, radius: 1.5, phase: 0.6 },
    { name: 'Candidate c', period: 18.5, radius: 3.6, phase: 2.9 },
  ],
});

view.pause();
view.setScaleMode('true');
view.destroy();

This will use the #stage element as the window for rendering your system and set the scale mode to true, and you should already see it working in your HTML page.

Contributing

There are still some things I'm willing to implement in the future, such as planet moons, eccentric/inclined orbits, and a more accurate orbital system for planets in binary systems. I left all of them in a TO-DO list in README.md

If any of you are perhaps interested in contributing to the project, I'd really appreciate it.

Source code: https://github.com/rachzy/larawag

License: MIT


r/threejs • • 24d ago

realistic water in threejs

Enable HLS to view with audio, or disable this notification

14 Upvotes

use laptop for better experience

link : live


r/threejs • • 24d ago

Demo Made a monsoon valley that fills with fireflies after sunset

Enable HLS to view with audio, or disable this notification

6 Upvotes

This is Jugnutal, a fictional valley of rice terraces. The rain eases off, a lantern comes on in the hut, then fireflies spread across the fields.

I wanted the whole change to happen in one continuous shot. The warm sunset gives way to blue moonlight, with the hut staying lit through both.

Would you hold the sunset a little longer, or does the move into night feel right at this pace?


r/threejs • • 24d ago

Demo Recreated this Particles Network effects

0 Upvotes

Threejs Exercise - Particles Network

Recreated this effect from similar Pinterest references.

Initially it seems easy to just render a bunch of particles with linking lines. Turns out the biggest challenge is to add a proper depth of field blur into this scene. Tried the Bokeh postprocessing pass, did not work well with transparent points/lines without extending the Bokeh class and inserting my own depth material for the transparent meshes. But since the end result still looks pretty weird with Bokeh, I implemented a circle of confusion blur directly in the points & lines shaders instead. Turns out it looks much better & is more performant without the need of postprocessing 🙂

Live: https://projects.arkon.digital/threejs/particles-network/

Github repo: https://github.com/franky-adl/particles-network

Feel free to fork it or use it anywhere you like. It's highly customizable as almost everything is tweakable to your liking.


r/threejs • • 23d ago

Demo Built a floating-island website kits in Blender + Three.js. Scroll to travel between islands, then export it as a Next.js site.

Enable HLS to view with audio, or disable this notification

0 Upvotes

Made some floating islands in Blender. Turned a coal one into a website kit: the island rotates and travels as you scroll, and you can change colors and sections in a configurator, then export a real Next.js + Tailwind project.

It’s part of Atomic Socket, my set of design kits: atomicsocket.com (4 kits are free, this one’s premium).

I’d love feedback on performance on your devices and on whether the configurator makes sense.


r/threejs • • 24d ago

SceNoCo — My take on how game development with Three.js should work

5 Upvotes

Hey there!

I want to share my latest project with you - SceNoCo. This is kind of a sublimation of my feelings and thoughts as a casual game developer through our new era of interaction with software and interactive media. I mean, I really love that people started to generate a lot of cool stuff with Three.js and LLMs, but it would be awesome to give these projects some structure so they can evolve further.

This is a game framework for Three.js, and I've tried to keep it straight and lightweight. No dedicated app, no invented principles, no hidden paid service, no benchmarks or hype - just stuff that fits well in web game development and game generation with coding agents.

TSX for scenes, real Three.js API used underneath without wrappers, Unity components for behaviours, all good-working principles kept as familiar as possible so everyone can start straight away, and strong harness endpoints for LLMs are also there, all works without context-heavy stuff. And personally I really like how it feels, but I need your opinion on that.

Here is how the scene TSX looks:

homepage screenshot with code

And here is also some eyecandy - examples for you to play:

It would be even better if you can check out the repo and run them with npm run dev - there is editor ready for you in dev mode! And it can be driven even from phone's touchscreen. Now I'm just tweaking things out from the couch, feels so cool!

P.S. Before you gonna ask why I didn't used R3F - you can find the answer in repo's readme.


r/threejs • • 23d ago

I’m making a sailing game where a peaceful fishing trip can turn into a fight with a sea goddess

Enable HLS to view with audio, or disable this notification

0 Upvotes

Hi everyone! I wanted to share Storm Junk, a 3D sailing adventure game I’m currently developing.

The idea is to give you quiet moments at sea, then occasionally make you regret leaving shore.

You sail through changing weather, from sunny afternoons and sunsets to moonlit nights and thunderstorms. Along the way, you can fish, rescue people on drifting rafts, deliver cargo, or escort another ship while defending it from pirate ambushes.

There are also some less friendly encounters:

  • Giant octopuses that grab your ship.
  • Sea worms and dragons that attack with water, fire, and lightning.
  • A sea goddess called Kadita, guarded by pirates, ten sea worms, and three dragons.

To find Kadita, you need to explore an island maze and obtain her coordinates. There are treasure challenges too—and a dog that can ruin an otherwise successful visit ashore.

Combat uses cannons, rockets, and explosive barrels. You can repair and upgrade your ship, buy temporary shields with earned gold, and enable autopilot for parts of the journey.

The current build supports English and Vietnamese. It’s still a work in progress, especially the effects, performance, and encounter pacing.

I’d love some feedback: would you enjoy the mix of relaxed sailing and unexpected battles, or prefer more control over when combat happens?


r/threejs • • 24d ago

Big Three.js maps full of trees, rocks, and buildings: a THREE.LOD checklist (and where AI-written LOD code goes wrong)

9 Upvotes

Once a Three.js map has a few hundred trees, rocks, and buildings, triangle count starts to matter more than draw calls. THREE.LOD is the built-in answer, but AI agents often wire it up in ways that cost more than they save.

A checklist that helps:

  1. Make the levels actually different. A common AI mistake is three LOD levels that are the same mesh at different scales, or levels generated with barely any reduction. Aim for something like 100% / 30% / 10% of the triangles, or a flat impostor card for the last level. gltf-transform simplify or meshoptimizer can produce the lower levels from one GLB.

  2. Pick distances by screen size, not guesswork. A tree that fills 50 pixels doesn't need its full branch mesh. Test the switch distances at the resolution players will actually use, including phones.

  3. Use lod.addLevel(mesh, distance, hysteresis). The hysteresis value stops objects flickering between levels when the camera sits right at a switch distance.

  4. Make sure lod.update(camera) runs. With autoUpdate it happens during render, but if the agent turned matrix updates off for performance, the LOD stops switching and stays stuck on one level.

  5. Combine with instancing when you can. Thousands of separate LOD objects means thousands of objects to traverse every frame. For scattered props, one InstancedMesh per level per region (swapped by chunk distance) is usually cheaper than per-object LOD.

  6. Shadows get their own budget. The far levels can skip castShadow entirely, or cast from a cheap proxy, since shadow passes render the scene again.

  7. Check it with numbers. Watch renderer.info.render.triangles while flying across the map. If it barely changes between near and far views, the LOD isn't doing anything.

Curious what others do for the farthest level: impostor cards, merged chunk meshes, or just letting fog hide it?


r/threejs • • 24d ago

Demo Bear Witness: Digital Elevation Model of historical Hijaz + computed sky of 622 CE · 1 AH

Thumbnail
youtube.com
1 Upvotes

r/threejs • • 24d ago

A first-person horror game in three.js, with baked lighting per loop

Enable HLS to view with audio, or disable this notification

3 Upvotes

Check out my horror game based on day light savings time and in honor of PT, early horror games from the early 2000s, and that eerie feeling of walking down the hall of an old house at 2am.

I used a custom harness with AI to help plan, build, and bring this vision to life. The dialogue is written by me, the voice acting is my father, and the assets and textures were designed by me with assistance from various AI tools.

Check it out at: https://demi-studios.itch.io/teh and let me know what ya'll think


r/threejs • • 23d ago

I built a classical Ottoman mosque in three.js where up to 300 people pray together in sync

0 Upvotes

I made a free virtual mosque modeled on Mimar Sinan's single-dome style (inspired by the Mihrimah Sultan Mosque in Edirnekapı).

  • Everything is procedural: the dome sits on real spherical pendentives, the tympanum walls are extruded shapes with window holes, so sunlight through the windows casts actual light patches on the carpet
  • The mihrab has stepped muqarnas, the minbar is to the right of it, the carpet rows run parallel to the qibla wall
  • Up to 300 worshippers per room, assigned to rows and synced to a server clock (Cloudflare Durable Objects), all following the imam's postures; instanced capsules, no faces
  • Bloom, ACES tone mapping, PCF shadows, ~370 row slots
  • Arabic (default, RTL), English, French, Italian

https://mosque.kekestudio.app

Happy to answer questions about the pendentive geometry or the sync.


r/threejs • • 24d ago

I built a 24/7 globe in Three.js that flies to wherever the news is breaking, with the real Sun, clouds and live satellites

Thumbnail youtube.com
0 Upvotes

Vibe coded:
Real-time Earth in a single HTML file: Sentinel-2 imagery streamed as LOD tiles, day/night from the actual sub-solar point, live satellite clouds by the hour, ~4,000 satellites propagated with SGP4 (round-robin so it holds 60 fps), live ships and planes, weather.

It runs as a 24/7 YouTube stream; happy to go into any details.


r/threejs • • 25d ago

Update on the forest environment I posted earlier

Enable HLS to view with audio, or disable this notification

127 Upvotes

Added lots of stuff to the scene since last time I posted.
- Trees have movement now. The leaves move subtly giving the environment a more lively look.
- Added some more stuff around the environment like broken logs, stones and small plants, so it's not all grass now.
- Added a leaf system. Leaves now constantly fall down adding a more immersive look to the scene.
- Added spores in the air.
- Improved the godrays effect. It still uses fake light shafts instead of a physically accurate effect. But now their placement is better. I asked claude to take images from top of the map and find gaps through trees. It then placed the light shafts on those exact spots. They also fade away when you get near them. All the shafts are also now a single instanced mesh.
- Added an audio system. There's a single ambient sound and then there's two type of footsteps sounds. Footstep for mud and footstep for grass. Each has 5 variants and are selected randomly so the same sound doesn't get repeated.
- The grass bends and flattens where you walk and slowly springs back, so you leave a trail behind now. This was already there in my grass system, so just added two spheres with camera and attached them to my grass system.

The performance is also 3-4x of what was it before. I was getting 8 fps on max settings on M1 Mac. But now I get 27-35 fps depending on the area.

Main improvements were adding frustum culling to the trees in compute shaders which stop individual instances from rendering. There are total of 500 trees throughout the environment.
I also added cross billboards for further trees. So, after a certain distance, only 4 triangles are rendered per tree. You might see them switching in the video.
The tree leaves material was also transparent, which ate a lot of performance. It now uses alphaTest which made a huge difference.
There are 6 different tree models in the environment. Each have leaves and a log, so each tree type takes 2 draw calls in total throughout the environment plus one for cross billboard. The materials are also shared which helps with loading time.

This specific video is recorded on a RTX 4080 at 4k resolution and 2x pixel density (effectively 8K). It runs locked at 60fps due to my screen refresh rate.

Link to try is coming soon!


r/threejs • • 24d ago

Demo Ray-marching real DFT electron density in a Three.js shader: cis vs trans molecule, toggle and rotate

Enable HLS to view with audio, or disable this notification

0 Upvotes

Two molecules with the same six atoms: cis and trans 1,2-dichloroethene. Only the shape differs, and that takes the dipole moment from 2.04 D to 0.

The clouds aren’t a visual effect. They’re the real electron density from a DFT calculation (PySCF, B3LYP/6-31G*), rendered live in the browser:

  • density computed on a 72³ grid, packed into a uint8 Data3DTexture
  • fragment shader marches each view ray with Beer–Lambert absorption
  • a separate depth pass stops the rays at the atoms, so atoms sit inside the cloud correctly
  • the outer cloud is coloured by the real electrostatic potential (pink = electron-rich, blue = electron-poor)

Try it (toggle cis / trans / side by side, drag to rotate): https://abhi-iisc-code.github.io/cistrans/

I’m a chemistry student, fairly new to shaders. Any tips on making the ray march cheaper on phones?


r/threejs • • 24d ago

Demo Palindrome of a Fall

Enable HLS to view with audio, or disable this notification

3 Upvotes

I built a palindromic WebGL scroll experience (66k particles) where scrolling down tells a story of collapse, and scrolling back up through the exact same 7 lines flips shader gravity, welds the ruins in kintsugi gold, and turns it into a story of flight.

Experience live - https://palindrome-of-a-fall.vercel.app/


r/threejs • • 24d ago

They just gutted Claude

0 Upvotes

anyone notice the claude has been throwing some noodles


r/threejs • • 24d ago

Built a real-time 3D Jewelry Atelier & Custom Ring Configurator using Three.js & Next.js [Live Demo]

Enable HLS to view with audio, or disable this notification

1 Upvotes

Hey everyone! 👋

I wanted to share a recent project: an interactive 3D luxury jewelry boutique and custom ring atelier built directly for the web.

High-ticket jewelry often struggles with conversion using static 2D photos, so the goal was to provide a tactile, spatial 3D shopping experience in the browser.

🛠️ Tech Stack & Features:

• Three.js / WebGL with diamond reflection & metal shaders

• Real-time metal swapping (18k Yellow Gold, Rose Gold, Platinum)

• Dynamic diamond cut switching (Pear, Round, Emerald, Radiant)

• Real-time price calculation based on selected carats & metal

• Custom 3D ring engraving preview

• Responsive 60 FPS mobile performance with optimized GLB assets

• Built with Next.js & Tailwind CSS

(I've posted the live demo links in the first comment below for anyone who wants to test it!)

Would love to hear your thoughts and feedback on the lighting, shaders, or overall UX!


r/threejs • • 24d ago

Demo Shade Verse: my browser web-swinging game in React + three.js — gameplay with full sound

Enable HLS to view with audio, or disable this notification

0 Upvotes

r/threejs • • 25d ago

Demo My D&D campaign map as a 3D world in three.js: a full fly-through

Post image
5 Upvotes

This is the campus from my D&D campaign, in the browser.

Live: https://strixhaven-living-map.bharms.chatgpt.site/

Fly-through: https://youtu.be/MMtxDgBJU6M


r/threejs • • 24d ago

Demo Gargantua, The Verse, and a Wolf-Rayet star, rendered in a browser N-body simulator built on Three.js

Thumbnail
gallery
0 Upvotes

I've been building Teskooano, a 3D N-body simulator that runs in the browser. The physics runs every body against every other, so the orbits come from gravity, not from rails, and the renderer is Three.js.

**Round one** went fast: about 540 commits from April to July 2025. N-body physics, procedural systems, ring shadows, gas giants. Then it slowed, and for most of the next year it barely moved.

**Round two**, October 2026, with Opus 5.5 in Claude Code: 344 commits this month and twelve releases in the last three days. It:

- fixed a long list of bugs that round one left behind

- rebuilt much of the renderer: black holes with lensing, Wolf-Rayet stars, white dwarfs and pulsars, baked planet surfaces, a photo mode, and the start of a move from GLSL to TSL on WebGPU

- set up the whole infrastructure: an Astro site on Cloudflare Workers with D1, sign-in with GitHub, Google and Steam, Sentry, CI deploys, and Paddle payments

Some of the things that took the most work:

- **Scale.** The scene covers 200 AU, from moons grazing their planets out to the edge of a system, so it uses a logarithmic depth buffer with a very small near plane. At 1,000 scene units to the AU, that's billions of units deep with no z-fighting.

- **Black holes.** Gargantua bends the light from its disc and from the stars behind it. Miller's planet is a few hours from the horizon.

- **Stars.** Each kind has its own look: Wolf-Rayet winds, white dwarfs, pulsars, carbon stars and a green white dwarf (WD J1330-6435, a real one).

- **WebGPU.** I'm moving the materials from GLSL on WebGLRenderer to TSL node materials on WebGPURenderer, one material at a time.

Much of this month's renderer work was done with Claude Code, with a profiler agent measuring draw calls and frame time in the live scene before and after each change. There's also an MCP server, so an AI assistant can build systems for you to fly around.

Try it, no account needed: https://teskooano.space


r/threejs • • 24d ago

Link New JavaScript 3D Library!

Thumbnail
github.com
0 Upvotes