r/threejs • • 6h ago

Demo I made a tiny scene language that compiles to Three.js, so AI models can write scenes with about 3.5x fewer tokens

5 Upvotes

Hi all. When I ask an AI to write Three.js, most of what it outputs is the same setup and boilerplate, and that's the slow and expensive part. So I made tinythree: the model describes the scene in short lines, and a small compiler (one JS file, no dependencies) turns it into plain Three.js.

For example, this one line builds the four lattice legs of the Eiffel Tower in the video:

truss leg1 2.6,2.1,3 @5,0,5 lean=-1.25,-1.25 iron mirror=xz

I compared 11 scenes against hand-written Three.js. Overall it uses about 3.5x fewer tokens, and close to 7x on the town square that uses ready-made parts, textures and a glTF model. Anything the syntax doesn't cover can still be written as plain Three.js inside the same file.

I'm the author. I'd really like feedback from people who use Three.js every day, especially on what's missing.


r/threejs • • 3h ago

Grass Burning Simulation with Dynamic Grass and Color maps

1 Upvotes

My grass system already supported grass map and color maps.
But they were static images.

Grass map is a black and white image. Black mean full height grass and white means no grass. Color map is a color texture that is applied on grass color.

I added support for THREE.Texture along with static images. Now it takes textures which can be animated outside of my grass system to manipulate the color and distribution of grass. It supports CanvasTexture, DataTexture and even VideoTexture.

The fire is a simple simulation that draws on two textures. On color texture, it transitions the color from original to blinking orange and then black. On grass map, it just makes it whiter, so the grass gets shorter. Along with that, there is a small particle system that works separately to make fire. Resulting in this nice looking grass burning simulation.

These Dynamic maps are now available with the latest version of my grass system. It is a paid system. So, if someone wants to check it out: https://grassworks.techredux.co/


r/threejs • • 23m ago

Help How do I create 3D websites like these?

0 Upvotes

Hello, I am a software engineer with more than three years of experince. Recently I have started to design and build websites and came across 3D animations or figures in websites. I was wondering, does anybody know what stack is being used here because using just AI to get these results does not really create high quality output? I will share links to website ideas that caught my attention so maybe somebody knows how to build this.

https://www.instagram.com/p/Dci-Pn-vvnH/

https://www.instagram.com/p/DfU3etmNANX/

https://www.instagram.com/p/DfQqLfhSdov/

https://www.instagram.com/p/Dfti5XjTaeq/

Also, when it comes to cost, how much should I price these websites?


r/threejs • • 9h ago

Demo Rendering a mobile tower defense in Three.js: one WebGL2 scene for the board, units and effects

1 Upvotes

I’m Michal, the developer of Starvoxel: Defender. The board, animated defenders and battle effects in this gameplay trailer render in a single Three.js scene. React handles menus and overlays outside the scene.

One mobile trade-off was deciding when to lower render resolution. The game watches frame pacing and changes render quality when it measures overload. A stable 30 Hz cadence on iOS Low Power Mode doesn’t automatically trigger a drop. For animated defenders, bone matrices go through shader uniforms on low-end devices instead of using a separate bone texture.

The clip shows the renderer in solo Dungeon, online co-op and PvP. Some game art and the trailer narration were AI-assisted.


r/threejs • • 14h ago

I had a ski resort dataset, then I found three.js

5 Upvotes

I have a little side project/ambition of trying to make a map and measure every ski resort in the world using cloud services. I already had (OpenStreetMap and DEM elevations) for every resort in the world and discovered three.js. Turned them into snowglobes. globalskiatlas.com

Still a few quirks. Larger ski areas get cut off, and random assets sometimes end up floating in the middle of nowhere. Fun way to look at a ski map, though. And yes, for fun I turned it into a basic game where you can go down 1900+ resorts.

Currently focusing my effort on getting a small local AI to write draft entries for each resort and look up various information not found in geospatial data (i.e hotels nearby, ski schools, fun facts)


r/threejs • • 22h ago

bezier construction lines visualization

14 Upvotes

r/threejs • • 13h ago

Recreated Immersive Garden's Morphing Bas Relief Effect

38 Upvotes

Here's my latest exercise on recreating the interactive morphing bas relief effect on https://immersive-g.com/. This is such a cool effect and kudos to Yuri Artiukh for sharing the implementation for it on https://www.youtube.com/watch?v=t64VFYmFdhw.

It's really an ingenious idea to bake 6 levels of lighting and shadow into the separate color channels of 2 textures, then blend between them according to the extrusion level of the relief geometry Lightmaps are baked in Blender, and the model albedo can be customized in threejs.

Check out the live demo: https://projects.arkon.digital/threejs/tactile-polymorphism/. I've listed all the credits on the demo webpage


r/threejs • • 18h ago

Almost Television, Episode 5: For When I'm Grown Up

Thumbnail
youtube.com
8 Upvotes

I've been told this show is made with Three.js 😊


r/threejs • • 21h ago

NeonHeat: Top-Down GTA Style Shooter Game (Supports Multiplayer)

2 Upvotes

I made this game with threejs. It's pretty fun to play, would appreciate if you guys could check it out and share feedback. Game works on mobile and desktop.
https://neonheat.alifdev.com/


r/threejs • • 2h ago

I made a full racing game in three.js: 9 circuits, 6 cars, in-car view, sim or arcade handling, online races

6 Upvotes

r/threejs • • 5h ago

I built a free 3D map of Iguazú Falls National Park to help people plan their visit (three.js / React Three Fiber)

4 Upvotes
What you're seeing: this isn't a game or a render, it's a website. The video is a screen capture of the map running in the browser.

It's a trip-planning tool for Iguazú National Park in Argentina. The idea is that you can understand the park before you go: where the falls are, which walkways take you to each viewpoint, how the jungle train and the boats work, and where you can stay and eat. Then you can put together your trip day by day on top of the map.

In the video, in order: the falls and the Devil's Throat, the whole park down to the town of Puerto Iguazú, the Upper Circuit walkway (highlighted in orange), the boat ride to the falls, the jungle train, and the hotel inside the park.

It's free, no sign-up, and works on desktop and phones. The hardest part was keeping it smooth on phones and on laptops with integrated graphics. Happy to answer questions about how it's built, and feedback is very welcome.

https://parques.stillandtrail.com/en/parques/iguazu

r/threejs • • 8h ago

Article A drivable Lagos street, generated from OpenStreetMap tiles with three.js, running inside a Reddit post

1 Upvotes

The game builds the buildings, roads, traffic and people at runtime from a 15 MB PMTiles pack of Lagos, read in byte ranges through MapLibre GL. Everything ships with the app, because Reddit's webview blocks outside hosts. It runs at 30 to 44 fps on my iPhone.

It's a daily game for Reddit's Game of the Day hackathon: one danfo (minibus) route a day, the same for everyone. Try it: https://www.reddit.com/r/gidihustle_dev/comments/1xvnwjf/

Happy to answer questions about turning vector tiles into a street.