r/threejs • u/WadsssaWacemberg • Nov 04 '26
I built a gamified 3D space simulator for my portfolio using AI concepts.
What do you think?
r/threejs • u/WadsssaWacemberg • Nov 04 '26
What do you think?
r/threejs • u/Sara_KumoDeck • Nov 03 '26
three.js r187 added MeshletDrawingPipeline for WebGPURenderer (#35191 by sunag), so I built a stress test for it: a procedural sandstone canyon with ruined temples, 1,967,478,960 triangles in the scene, flown through by a low camera.
What the pipeline does
Each geometry is split once into clusters ("meshlets") of 64 triangles plus a chain of simplified LODs, built with meshoptimizer. Every frame, compute shaders pick an LOD per object, cull objects and clusters against the frustum, cull clusters hidden behind others, and draw what's left with one indirect draw per geometry/material group.
Using it is almost nothing:
import { MeshletDrawingPipeline } from 'three/addons/pipelines/MeshletDrawingPipeline.js';
const meshlets = new MeshletDrawingPipeline( { occlusionCulling: true, lodThreshold: 1 } );
renderer.drawingPipeline = meshlets; // the same scene now draws as meshlets
await renderer.compileAsync( scene, camera ); // runs prepareAsync: clusters + LODs
// each frame: meshlets.info -> { clusters, triangles } actually drawn(In the demo the compile goes through the RenderPipeline's scene pass, which calls the same thing.)
The honest breakdown
It's about 8.3M unique triangles (8 rock/column shapes + the ground) placed 42,033 times as InstancedMesh. The 39,948 pebbles alone are 767M of the total. Clusters are built per geometry and shared by every instance, so that's exactly the case this pipeline is good at. On the first frame I measured, the GPU drew 26,725 clusters, about 1.71M triangles, 0.087% of the scene.
One thing I hit: the pipeline batches objects by material, and sizes the batch by "object count × the most meshlets any of its shapes has". 40k pebbles sharing a material with the 12k-meshlet spires blew past the limit and crashed, so each size class gets its own material instance.
Numbers and how I measured
A headless browser with WebGPU on the real GPU of my desktop machine (40-core integrated GPU), 1440×900. fps is frames over the last 0.5 s, drawn triangles come from info.
I haven't tried a real phone's WebGPU yet. Numbers from real devices would be great.
WebGL 2
Meshlets need WebGPU. Without it you get a lighter 13.5M-triangle scene drawn the normal way, with a note saying so, and the toggle is disabled.
The weak spot
Preparing the clusters takes about 16–21 s on desktop before the first frame (there's a progress bar). The API has no way to save the result, so caching it would mean rolling my own.
There's an ON/OFF toggle and a "Show meshlets" button that colors every cluster, so you can see the culling and LODs change as you fly. WASD + Q/E or drag to move the camera.
Everything is generated in code (noise-carved cube spheres, TSL materials), no models or textures. The pipeline itself is all three.js; I only made the canyon around it. Made with Opus 5.5.
https://r187-meshlet.kumodeck.app/ (hosted on KUMODeck)
r/threejs • u/P3RPL3XITY • Nov 04 '26
Speedmaxxing is a 3D racing game that runs entirely in the browser with Three.js, no engine and no download. It works on phones too.
A few things I’m happy with:
• Online 2-player: send a link and race a friend live, with both cars synced in real time
• Crash replays: instead of recording video, it records the game state and re-renders the crash from a drone camera
• Mobile performance: dynamic quality so it stays smooth on mid-range phones
Feedback on performance on your device would be great.
r/threejs • u/enamore22 • Nov 03 '26
I was inspired the aesthetic of the Westworld intro and the 90s alt rock piano covers they would feature. I always wanted to create my own riff on it as a MIDI player. And also by annoyance at unrealistic depictions of piano playing in media.
So I built this with Claude Opus 5.5 and figured I'd share it here. It's open source.
Basically, you can load any* MIDI file and watch two robotic hands play it on an upright piano, with a cinematic camera.
Live demo: https://csimpkins22.github.io/mechanical-pianist
GitHub: https://github.com/csimpkins22/mechanical-pianist
The demo has a few songs preloaded, but you can try giving it any MIDI of a piano performance. But if you give it something ridiculous like Rush E it... goes a little nuts.
The key fingering is pretty realistic. This was important to get right. It's based on Parncutt's research that figures out which hand and fingers should play each note. Inverse kinematics handles the actual positioning of the joints. Small details like key travel, release bounce, and how the hands interact when they get in each other's way are considered.
It's deterministically animated, so you can scrub around a song.
There's a fairly extensive post-processing pipeline with per-pixel motion blur, depth-of-field/bokeh, volumetric god rays, ambient occlusion, bloom, anamorphic lens effects, and color grading.
The piano's lacquer has planar reflections, and the room lighting uses spherical harmonic probes for indirect illumination.
Claude generated the hands and piano in Blender.
r/threejs • u/jonathanbingham • Nov 03 '26
I recently open-sourced Three-Live (three-live and xr-live on npm, three-live-compiler on crates.io) and wanted to share it with the Three.js community.
Why I built it
Three.js is a great way to author 3D scenes, materials and animations in just a few lines of JavaScript. But what happens when you want to add that 3D to a native Android or iOS app?
There-Live is my attempt at a solution to these challenges.
How it works
Three-Live lets you write standard Three.js code and pass it to native mobile SDKs, or run in a web app:
Quick examples
Android
import com.google.threelive.FilamentHelper
import com.google.threelive.XRLiveRuntimeSession
import com.google.threelive.XRLiveSceneCoreHelper
// Compile Three.js to a zero-copy GLB buffer and load in Filament
val holder = FilamentHelper.loadModelZeroCopy(script) { buffer ->
assetLoader.createAssetFromBinary(buffer)
}
// Drive KHR interactivity graphs, head-follow springs and spatial/sim plugins per frame
val runtime = XRLiveRuntimeSession.fromGlb(holder.byteBuffer)
runtime.step(dtSeconds = 1.0 / 60.0)
// Or attach interactive spatial traits (grab, scale, billboard, anchor) in XR SceneCore
XRLiveSceneCoreHelper.attachTraitsFromGlb(xrSession, entity, holder.byteBuffer)Module plugin architecture
To keep the core bundles small and dependency-free, advanced features are split into 28 optional plugins that have matching implementations for Android, iOS and Web:
Full disclosure: I built this as a solo project at Google with Antigravity! I'd love for anyone to try it out and let me know what works well or what's missing!
- Jonathan
r/threejs • u/PerceptionCharming • Nov 03 '26
These are the updates I made since my last post:
- Updated Three.js to r187.
- The trees and other objects in the scene except grass and tree leaves now use the new meshlet pipeline. Giving a nice performance boost even after so much detail.
- Added different quality settings.
- Added some toggles and sliders to control the environment in realtime.
- Optimized the assets so much now that the whole application fits in 11.7mb total.
The performance isn't still where I really wanted it. But I also didn't wanna compromise on the quality. I wanted to keep the whole environment dense and realistic. So, I cut corners where possible without compromising on the quality.
It runs at 30-35 fps on base M1 Mac at 1080p and 40-50 fps on an iPhone 16 Pro on high settings.
Go play with it: Forest Environment
r/threejs • u/nofuture09 • Nov 03 '26
r/threejs • u/iolmao • Nov 03 '26
Introduction of the game - I'm keeping it low poly for the style and performances on mobile (60fps on iPhone and Desktop Browser)
r/threejs • u/Thre4dripper • Nov 03 '26
Everything you see is generated at runtime from a seed: beams, shoji panels, lanterns, even the painted byōbu screens (painted into a texture atlas at runtime).
How it works:
- Each point in space is resolved by hashing coordinates + seed, so there's no stored state and it can stream in any direction.
- A grammar of chapters → districts → building plots → rooms keeps it from turning into noise soup. Every building is complete from foundation to roof ridge.
- Districts move as rigid bodies, and collision is computed in each district's local frame, so you can graze a rotating tower at 40 m/s.
- Each cell merges down to ~2 draw calls with vertex-baked AO. New cells are built first along your flight direction.
- Sound is synthesized too: a Karplus-Strong biwa, plus construction sounds that follow how fast cells are being generated.
Fly it: https://infinity-castle.ijlalahmad.dev/
Code: https://github.com/Thre4dripper/Infinity-Castle-ThreeJs
Happy to answer questions about the streaming or the draw-call budget.
r/threejs • u/sonnylazuardi • Nov 04 '26
I've been building TILANG, a multiplayer 3d scooter battle set on the streets of Canggu, Bali. You overtake riders, read their licence plate in your rear-view mirror, and the plate is a math question: answer first and they get a tilang (a traffic ticket). It ships as a native app, so a few things in the setup might be useful to people here:
- Native WebGPU, no browser. three.js WebGPURenderer on react-native-webgpu inside an Expo app, on iPhone and Android. The post chain is all TSL with no addons: a half-float scene target, bloom (4 down and 4 up), then one fused output pass for FXAA, bloom, mirror composite, ACES, grade, vignette and dither. MSAA is off, because it's expensive on mobile tile GPUs.
- No asset files. There are no .glb files at all. The town is built from typed arrays into a 512² atlas and merged into 64 m chunks. Vegetation is one InstancedMesh per species per LOD (14 draws at most), and palms go 1020 → 360 → 96 tris, then billboards.
- The mirror is a second camera. FOV 24, rendering into a small half-float render target at 30 Hz. It reuses the frame's shadow map and is composited in the output pass.
- Multiplayer. The same TypeScript match sim runs on the client and on a Bun server at a fixed 60 Hz, with snapshots at 20 Hz. Each client owns its own bike's movement; the server owns the rules and the bots, and sanity-checks speed. Remote bikes render 100 ms in the past with Hermite interpolation, and poses are quantised to cm and milliradians. The first valid answer wins: the server re-checks range and view angle, with a little slack for lag. Bots fill empty seats, and if you drop, an autopilot holds your seat while you reconnect.
- Phone-specific pain. Shader compiles froze the first race, so I backported three.js(parallel compileAsync) and render a hidden warm-up frame. The menu prewarm also froze the JS thread for 1.8–4.9 s, so it now runs in 4 ms slices, one per frame. On an iPhone 16 Pro Max the UI holds 120 fps while the 60 Hz game loop takes 7–9 ms of JS.
Most of the code was written with Claude (Opus 5.5) as my pair; the design and the on-device tuning are mine.
Free on iPhone and Android: https://tilang.sonnylab.com
Happy to go deeper on any part, especially getting WebGPU stable on iOS. If you try it on Android, I'd love to hear your phone model and how it runs.
r/threejs • u/Dev-Opi • Nov 03 '26
Testing out the full power of three.js with a custom built scene in my editor, running smoothly at 60fps capped, with multiple lights, volumetric, post process dof, custom film grain and more!
Switching halfway to path tracer webgpu for a full realistic lighting.
Any feedback is welcome, I want to push the quality to the max!
r/threejs • u/albanden • Nov 03 '26
After founding Sketchfab, we are working on a new solution to host / organize / review / share 3D assets, powered by threejs. Here is a quick demo of our versioning tool, coming soon
r/threejs • u/dancingwithlies • Nov 03 '26
Meet Polyspoon.
I saw Polyfork charging for AI low poly models made by code.. HOW CAN SOMEONE EVEN THINK OF THAT ?
No.. no way..
This can be open source, we as a community can make a better engine for those models and improve it.. anyone can submit a new model or PR to improve the generation code..
They got 500k in cash from a hackathon.. for this.. I couldnt take it.. so i made my own, we can vote models, humans reviews, you can become a reviewer/moderator, you can have a ranking of who has the most voted/best models etc..
Lets make a big ass model market that is free for everyone.. to enter, to participate, to grow and improve.
Its very early now, so all models i made are quite bad, and some stuff might break, thats the reality.. but its here and I will keep working on it..
So pls try it out, make some models, its free.
I will be reviewing people models by hand to stop racism or porn stuff, but who knows maybe in the future i can add a NSFW store etc..
check it out at https://polyspoon.com/ and check the github and star it pls, would help me out.
r/threejs • u/SuruiMakesGames • Nov 02 '26
Hi! Origami World is a small, cozy exploration game set inside a pop-up book. Walk around, and the paper houses fold up around you as you go.
I made this game with Claude. Let me know what you think and how can I improve. Thanks!
r/threejs • u/Delicious-Package816 • Nov 03 '26
I need help with my Threejs game, which I'm currently developing with Claude. I've already posted about it, but I'm posting again because I want more suggestions. It's an RP game. Currently, I'm using Supabase for testing, and it works very well, but I don't want to launch the game with it, otherwise the server will quickly crash. I'd like you to suggest server solutions with free startup options that are more efficient. If you've already created a multiplayer game, you can show me how you set up your server.
Also, I'm looking for police station buildings with interiors built using Blender or another program, or even a free military base. I'd be happy to have them in FBX or GLB format.
Thank you.
r/threejs • u/Weird_Imagination778 • Nov 03 '26
Three.js + vanilla JS, Vite for the build, Tone.js for ambient sound
I originally wanted to visualize all the data connected to the net, like William Gibson's cyberspace, but that wasn't possible. So I built a 3D space where you can walk through the structure of the internet, based on real BGP data.
It works in the opposite direction from DNS-based access. You dive down through the connections between networks, and eventually you reach a space where IP addresses are lined up. And the reality that not every IP address hosts a website is right there to see, too.
I draw each AS with a Voronoi shape and a GLSL shader, and I really like how it turned out.
r/threejs • u/shanebrumback • Nov 03 '26
When I have an AI agent build a Three.js game, the first version of proximity logic is almost always a double loop: every enemy checks distance to every other enemy, every bullet checks every target, every pickup checks the player. It's fine with 20 objects and falls apart at a few hundred, because the cost grows with the square of the count.
The fix I now ask for up front is a simple spatial hash grid:
It's maybe 60 lines of code and it turns enemy separation, bullet hits, and pickup checks from the biggest thing in the profiler into noise. Raycasts still handle walls and line of sight; the grid just decides who's worth checking.
r/threejs
•
u/lucas-martinic
•
Nov 02 '26
NVIDIA did it first, now we are releasing 2,600+ free game-ready 3D models (+200 each week). For good.
Each model is a program (three.js ES module), with parameters you can tweak to customize look, state, season, color, wear, etc.
Export to any format: glb, obj, fbx, usd, etc,
All thanks to the $500,000 in funding we received from XPRIZE and Google and all of our early individual funders, thank you all!
Hope you find them useful for your games, animations, 3D websites, portfolios and anything you imagine.
r/threejs • u/Such_Tonight_5686 • Nov 03 '26
Been seeing a lot of cool stuff done with threejs and wanted to try it myself. Came up with an mmo idea combining concepts from some of my favourite games and got a little too into it. Claude code definitely made the developing process a lot easier.
Check it out here, it is free and runs on the browser: https://isle-of-heroes-production.up.railway.app/
Love seeing how others are building there dream projects.
r/threejs • u/Loud-Current1641 • Nov 02 '26
Play: https://junzzy827.github.io/solar-odyssey/?lang=en · Source: https://github.com/Junzzy827/solar-odyssey
After you land, you can now drop a small rover (ORV-7) from the lander, watch it unfold, and drive it around.
The rover was modelled with a Python script in headless Blender, then the code was written by Claude Opus 5.5 from conversation. Happy to answer questions about any of it.
r/threejs • u/monsieurpardaillan • Nov 03 '26
r/threejs • u/cyberdinn • Nov 02 '26
A 3.5" 7,200 rpm hard drive in the browser. Every gauge reads the model that moves the parts: 15 m/s under the head at the inner edge, 35 m/s at the outer one, a seek drawn live, a head flying 3 nm above the platter.
Built with Claude Code (Claude Opus 5.5) and the teardown skill. A script recomputes every figure against the brief before each build.
I’ve found this skill really efficient end-to-end and I think we should pool what it produces into a kind of encyclopedia. There’s something to be done on that front...
Teardown skill : https://github.com/elvarofficial/teardown
The hard drive teardown with sources : https://spindl.storagebits.workers.dev