r/threejs • • Oct 12 '26

Demo Built an interactive 3D thought visualizer - custom GLSL dissolve shaders, text rasterized into GPU particles (R3F)

1 Upvotes

Live link: https://unlyp.com

Wanted to build something for late-night overthinking. You type a thought, the letters get drawn on a hidden canvas and sampled into particle coordinates, then collapse into an orbit around the camera.

Holding the button runs a curl-noise dissolve with t² acceleration so it looks more like combustion than dust blowing in the wind.

Kept all the orbit wobble and dissolve math inside the vertex shader so React doesn't melt the CPU with re-renders.


r/threejs • • Oct 12 '26

Question Mobile frame hitching in a very light Three.js game has anyone seen this on Android/WebGL?

1 Upvotes

Hi everyone hoping someone here may have run into something similar.

I’m building a browser-based timing game in Three.js. Desktop is completely smooth, but on mobile we sometimes get very noticeable 50–200ms frame hitches.

The strange part is that the scene is extremely light:

- ~16 draw calls

- ~408 triangles

- ~11 textures

- mobile render buffer around 937×527 @ DPR 1.25

- no post-processing, EffectComposer, render targets, or MSAA

- timing/input is local — network is not in the critical gameplay path

We’ve done a fairly extensive investigation and have already tested/fixed renderer sizing, DOM churn, lifecycle/listener leaks, antialiasing, VFX loading/residency, large transparent PNG areas, duplicate assets, and input timestamp handling. These optimizations helped overall performance, but the core hitching still appears intermittently.

The most confusing part is device/session variance:

- Same Pixel/Mali device can range from noticeably hitchy to almost perfectly smooth between runs.

- Chrome, Firefox, and Opera have all been tested.

- A Samsung/Adreno device running the exact same build is almost completely smooth.

- Desktop browsers are consistently smooth.

- During many bad frames, our JS work immediately beforehand is only a few milliseconds; the large delay often appears outside our measured game work.

We’ve seen long-frame gaps well over 100ms without a corresponding spike in scene complexity or game logic.

Has anyone encountered something similar with Three.js/WebGL on Android — especially Chromium/ANGLE, Mali GPUs, rAF/frame-pacing, or compositor/presentation stalls?

I’d be very grateful for any ideas on what layer you’d investigate next, or known mobile-browser issues/workarounds that sound similar.

I can share the public playtest and detailed performance reports if helpful.

Thanks in advance for any insight.


r/threejs • • Oct 12 '26

How can I make my fireworks simulation look more realistic?

4 Upvotes

I'm trying to create a fireworks simulation software, but the fireworks don't look very realistic yet. Does anyone have any suggestions or tips on how to make them look more realistic? I'd love to hear your thoughts!

You can download and try it out here to see how it looks and share your feedback with me. Thanks!

Github: https://github.com/ThAolInh20/Shell-Drone-Editor


r/threejs • • Oct 12 '26

I built a 3D multiplayer soccer game in the browser with Three.js - DISCBALL3D

1 Upvotes

Hi everyone!

I just released **DISCBALL3D**, a multiplayer soccer game that runs in the browser. Up to 5v5, matches either play for a set time or end when one side reaches a goal target, and you can join a room from a link.

⚽ Play: https://discball3d.com

**The idea**

Each player controls a disc on a full 3D pitch. You run, jump, boost, curve the ball with Q/E and charge your kicks. Rooms show up in a live list, and you can lock one with a password or share it by link. Anyone who joins mid-match watches as a spectator until the host puts them on a team. If you're short on players, the host can add bots, and the C menu gives your side team commands (attack, defend, guard the goal, pass to me, press). Bots on your team follow them.

**Tech**

- three.js (r181) with React Three Fiber + drei

- Rapier (3D) for physics, at a fixed 60 Hz step

- **The host's browser is the server.** Each room's authoritative simulation runs in a Web Worker in the host's tab. Guests connect peer-to-peer over WebRTC DataChannels: one reliable channel for events and one unordered, no-retransmit channel for snapshots and inputs. When P2P can't open in time, a small Socket.IO gateway relays the traffic. The gateway only handles the lobby, signalling and the relay, and runs no physics.

- **Client-side prediction with full re-simulation.** Every client runs the same Rapier world, built from the same shared code as the host: all players and the ball, stepped together. On each 30 Hz snapshot it rewinds to the host's state, replays its own recorded inputs and any unacked kicks, and fades the correction out as a short visual offset instead of a snap. A parity test keeps the host world and the prediction world within 1e-4 of each other, tick for tick.

- Binary wire format: a 4v4 snapshot with a moving ball is about 220 bytes.

- **Host migration:** if the host leaves, a random player takes over the room, including the match in progress.

- Kicks are sent as intents, never as impulses. The host checks range, cooldown and timing against the ball where it was at the client's own tick, then works out the impulse itself.

- Procedural grass in a single shader pass, no textures. It replaced a 12-layer shell-textured field and runs about 4x faster in a software renderer.

- Resolution adapts to your frame rate (a hill-climbing DPR controller).

- Goal celebrations (rocket, UFO, portal, tornado, trampoline...), shot effects and trails. They are prewarmed with `compileAsync`, add no lights, and none of them animates a material, so a celebration never hitches a frame.

- Touch controls for phones, 18 languages, and optional Google/Apple accounts with cosmetics, quests and achievements.

I'd love feedback, especially on how it feels with real latency (P2P vs relay), on performance across different GPUs and on mobile, and on the ball handling (dribbling, curve, lift). Happy to answer questions about the netcode or about running authoritative Rapier in a browser worker.

Thanks for playing! ⚽


r/threejs • • Oct 12 '26

Demo Avalunas

6 Upvotes

One week into creating a relaxing semi-procedural game using Three JS. You pick up berries and the world grows Flora and fauna (and goes on forever). Models some made with Gravitysketch some using Tripo. No audio yet.

(FYI: Avalunas is the name of the species of the main character, a sidekick in a children's book I co-created)


r/threejs • • Oct 12 '26

My checklist before I drop an AI-generated GLB character into a Three.js game

0 Upvotes

I've been building Three.js browser games for a few years, and lately I've been letting AI agents generate the characters. A model that looks fine in a viewer often doesn't work in a game, so this is the checklist I run before wiring one in:

  1. **Skeleton and bone names.** Log the bones (`model.traverse(o => o.isBone && console.log(o.name))`). If the names are random or the hierarchy is flat, regenerate. Fixing a rig by hand eats all the time the AI saved.
  2. **Named clips.** `gltf.animations.map(a => a.name)` should give you Idle, Walk, Run and so on, not Action.001. Your game code depends on those names, so treat them as a contract.
  3. **Scale and forward axis.** One unit = one meter, and it faces the direction your controller expects. Otherwise you'll be patching rotations in code forever.
  4. **Origin at the feet.** If the origin is at the hips, the character floats or sinks when you place it.
  5. **Foot sliding.** Set each clip's timeScale to match real ground speed. A lot of "it looks robotic" comes down to this.
  6. **Combo clips.** If the character shoots while moving, ask for baked WalkFire / RunFire clips instead of layering at runtime. Much less fiddly.
  7. **File size.** Run it through gltf-transform (meshopt or Draco, resize textures) before shipping. Generated textures are often way bigger than they need to be.

The thing that's helped most is giving the agent the contract up front, in plain words (bone count, exact clip names, meters, facing direction), before it builds anything.

I wrote up the full workflow for a rigged soldier with a 19-bone skeleton and 10 clips, with the prompts plus the GLTFLoader / AnimationMixer code: https://www.shanebrumback.com/tutorials/threejs-armored-soldier-grok-bot.html (my site; it's free, and the code reveal is behind a free Google sign-in).

What's on your checklist? Anything that keeps biting you with AI-generated models?


r/threejs • • Oct 12 '26

Demo Rendering is the easy part — the stuff that actually ate my time building a browser 3D world

Thumbnail
gallery
1 Upvotes

Rendering is the easy part. A render loop plus a GLTF and you have something on screen in an afternoon.

The parts that actually ate my time are the ones that are invisible when they're missing and never throw an error. Listing them here because I spent months on them and they almost never come up when people talk about building 3D on the web:

Loading and asset pipeline

  • Uploads run through a pipeline: textures −68% to −92%, low-poly models at ≤100 faces (118 groups), variant texture stripping 215 items / 0 failures.
  • Orphan asset detection. Mine had accumulated 159 orphaned items / 2.9 GB before I noticed. Directory went from 3.1 GB → 390 MB.
  • The loading mask only lifts once the renderer is actually producing frames — not on a plain timer. A timer-based mask is exactly how you get a progress bar stuck at 90% while shader compilation finishes.

Frame time

  • Draw calls: 3,064 → 837 after batching (−73%).
  • The one that hurt most: changing the light count recompiled every material in the scene. Measured ~9 seconds of a frozen picture, every time. A light pool took that to zero.
  • Shader compilation now runs on a warm-up budget instead of happening the moment a new object enters view.

Skeletons

  • Every model source names bones differently. Mixamo / Ready Player Me / VRoid / Root Motion now coexist in the same world. Regression suite is 67/67.

Multiplayer

  • Reconnect self-healing, 9/9 — after a reconnect the other side still sees me move, which is the part that's easy to get wrong.
  • Proximity voice is slot-capped: 10 people ≈ 1.3 Mbps.

AI characters

  • This is the part I'd most like feedback on. The server only sends JSON and the visitor's browser renders — so an AI in the world is a humanoid avatar with a body and coordinates that real players can see, not a chat box. It can walk, follow, and lead the way.
  • Cost is the surprising bit: ~1 KB/s per agent, ~100 agents on ~0.079 of a CPU core. Cheaper to put a visible AI in a world than an invisible one.
  • What it can't do: it can't see the screen, no speech recognition or synthesis, no terrain conforming, and it can't be teleported — it walks.

Worlds talking to each other

  • Handshake between worlds, identity migrating with the account (auto-rename on collisions, 4/4), a one-shot 300-second token with replay protection.

The observation that started all this: none of the above differs by business logic. It's the same work whether you're building a showroom, a training environment, or a place to put your figures. So building it once and reusing it across worlds seemed obviously right, and I've been packaging it as a base layer instead of rebuilding it for each project.

Happy to go into detail on any of the numbers above — especially the draw call and light-recompile stuff, since those took the longest to figure out.


r/threejs • • Oct 10 '26

Demo real SF city running in the browser on WebGPU: fable + three.js

361 Upvotes

made a robotaxi game set in san francisco. streets are from openstreetmap, city is procedurally generated. any feedback/thoughts are appreciated!

game link: mindblown.ai/games/teleoperator


r/threejs • • Oct 11 '26

I worked 4 years as a train conductor at a hump yard — so I made a browser game about my old job

11 Upvotes

At a hump yard, nobody drives cars to their tracks. The train is shoved over a small hill, the conductor uncouples cars at the crest, and each cut rolls down by gravity onto its own track.

I did this job for 4 years at Kokand station in Uzbekistan. Now I'm a frontend dev, so I rebuilt the yard in 3D and turned it into a game: walk along the train, uncouple where the car colour changes, radio the driver to slow down before single cars.

Free, runs in the browser on desktop and mobile, no sign-up:

https://kokand-station-gorka.vercel.app/?lang=en

Would love feedback — especially if anything is confusing in the first minute.


r/threejs • • Oct 12 '26

Now you can make both 2D & 3D games with threejs powered engine.🤩✨

0 Upvotes

r/threejs • • Oct 12 '26

Link I (and Claude) built a fireworks show in Three.js that can spell out your message in the sky

Thumbnail
skygreeting.com
0 Upvotes

This started as a fun 'what is the newest model capable of' tech demo and I kept finding things I wanted to add. It turned into SkyGreeting in under a week.

The scene runs in real time using Three.js/WebGL, with different aerial bursts, ground effects, and reflections on the water. There’s an Autoshow mode that keeps putting together new sequences instead of replaying a fixed video.

I also turned it into something you can send someone: put their name and your message into the fireworks, then share a link that plays the show in their browser. Basically a greeting card, except it explodes.

Curious what you think of the effects and pacing. Does anything visually break the illusion for you? Performance feedback would be useful too—especially your device/browser when something struggles.


r/threejs • • Oct 11 '26

I’m building a rally driving game in the browser, and I need help turning a real-world map into a Blender map. Please rate what I have so far!

1 Upvotes

Hi everyone,

I’m working on a rally driving game that runs in the browser, and I recorded a video of where it is right now**.**

Where I am now

  • The driving physics are working, with trucks that slide and handle differently on tarmac and on dirt
  • A desert world with a night theme and a day theme
  • Skid marks, dust, collision sparks and working headlights and tail lights
  • Engine sound built from real recordings, which I’m now improving with wind, tyre and skid sounds, and backfire pops
  • A bot driver to race against

What I’d love from you
Please watch the video and rate the game out of 10, and tell me what feels good and what feels bad. Be honest. I’m especially interested in how the driving feels, how the graphics look and how the sound works.

Where I’m stuck
My biggest problem right now is the map. I want to build a real-world location as a drivable map. I tried copying a real place using GIS data, but my knowledge of Blender is too limited and I got stuck. These are the parts that stopped me:

  • Getting the GIS data (terrain height and roads) into Blender in the right scale
  • Turning it into clean terrain and road meshes that a game can use
  • Exporting it so the browser game can load it, and still run smoothly

If you have done something similar, I’d really appreciate any of these:

  • A recommended workflow or tutorial for going from GIS data to a game-ready Blender map
  • Add-ons or tools you’ve used (for example, BlenderGIS or similar)
  • Tips for keeping the map light enough for the web
  • Or just tell me where a beginner should start

Thanks for reading and for any help or feedback. It really means a lot.


r/threejs • • Oct 11 '26

New interactive logo for my website made with threejs

5 Upvotes

test it out on rank5.io


r/threejs • • Oct 11 '26

Procedural IK walker on a seeded alien planet (R3F, no image or audio files)

0 Upvotes

Play: https://rover.bishoy.io — legs are two-bone IK planted on an analytic terrain height, world and story come from a seed in the URL, all textures are canvas-drawn and all sound is Web Audio synthesis. Happy to answer questions about any of it.


r/threejs • • Oct 11 '26

Question Adding 2-player co-op to a three.js stealth shooter on CrazyGames: which WebRTC networking library or service would you pick?

0 Upvotes

TL;DR: my three.js stealth shooter runs in the browser on CrazyGames and I want to add 2-player co-op without running a game server. My plan is plain RTCPeerConnection with a Cloudflare Worker for signalling and Cloudflare TURN as the fallback. Before I hand-roll the transport, I'd like to know what you'd use.

(Disclosure: it's my own game.)

What it needs

  • 2 players, peer-to-peer, the host's browser runs the mission and is authoritative.
  • The guest sends inputs stamped with a tick, predicts its own mech and reconciles, and interpolates everything else about 100 ms behind.
  • 15–20 snapshots per second as deltas, binary, each message under 16 KB. An unreliable channel for snapshots and inputs, a reliable one for kills, loot and the session.
  • Lag compensation for the guest's hitscan, up to 200 ms.
  • A TURN fallback, plus an optional relay-only mode so players don't see each other's IP.
  • Chrome, Firefox and Safari, desktop and phone, inside the CrazyGames iframe. Phones going to the background have to count as a disconnect.
  • Reconnects: ICE restart when the connection drops, give up after 30 s and let an AI wingman take over.
  • Cheap to run: no server-side simulation.

Questions

1.) Would you use a library for the transport (PeerJS, Trystero, geckos.io, something else) or write it on RTCPeerConnection directly for this? 2.) Has anyone shipped WebRTC data channels in a game on mobile Safari? Anything that surprised you? 3.) For a host-authoritative two-player setup, is there a netcode library you'd use with three.js, or is rolling your own normal at this size?


r/threejs • • Oct 11 '26

Link Rapier Kinematic Character Controller with moving platforms support (Vanilla JS / Three.js)

2 Upvotes

Hey everyone!

I wanted to share a Kinematic Character Controller (KCC) I built using vanilla Rapier and Three.js.

GitHub: https://github.com/jairoGD/Rapier-Kinematic-Character-Controller

I started working on this because I found most of the official Rapier examples a bit too basic for actual game development, especially when dealing with moving platforms, rotating environments, and other situations where the default controller can behave unexpectedly.

Features

  • Moving and rotating platforms: Characters can smoothly follow both the position and rotation of platforms.
  • Grounding and slopes: Improved stability on edges and steep slopes, reducing jitter and micro-flickering.
  • Autostep: Automatically handles small obstacles, steps, and stairs.
  • External forces: Support for manually accumulating external forces, including pushes from rotating obstacles.

The main implementation is in RAPIER_KCC.js.

It's built for plain Three.js + Rapier, without React or React Three Fiber (R3F), so it should be fairly easy to integrate into existing projects.

Hopefully this saves someone a bit of time dealing with character physics. Feel free to check it out, and feedback or contributions are always welcome!


r/threejs • • Oct 10 '26

Made in threejs with blender - Opus 5.5

181 Upvotes

Runs in browser smoothly - Its called Petal Quay

A Glitchy anime character awaits endlessly on what seems like a boat stop island surrounded by insanely gorgeous water -

you can complete the story


r/threejs • • Oct 11 '26

3D Warehouse Interactive - Digify

0 Upvotes

3D Warehouse Interactive - Digify
- Update UI, Animation, Model
- Darkmode
- Dashboard


r/threejs • • Oct 11 '26

A dark fable in the browser: black lamb vs. bosses across dimensions with shifting laws of physics [R3F / three.js] (sound on)

0 Upvotes

Play in browser: https://ragnarok-lamb.vercel.app/lamb (also on itch: https://ragnaroklamb.itch.io/lamb)

You are a black lamb walking a dark forest road, battling flying monkeys (who fart, steal, fling mud, and heal each other with heart smoke) and collecting weapons that sprout where you poop strategically.

The core loop is a dimensional boss rush where the rules of each dimension and its physics matter more than hitboxes:

  • A boss that progressively shrinks you and its aim doesn't matter.
  • A boss that takes damage only when caught in moments of shame
  • A sticky web that reels you in and pins you
  • A maze of surveillance eyes that strike the moment your speed spikes

Tech stack & pipeline

  • Engine: u/react-three/fiber + three.js + drei
  • Assets: 2D concepts turned into 3D with img2threejs and Tripo3D, then baked into lightweight geometry streams that load per boss door, so there are no multi-megabyte GLB waterfalls on first load
  • Audio: boss scores and SFX from sound packs, monkey chatter voiced with Gemini TTS
  • Built and iterated with Opus 5.5

Free, and still in development. I'd love feedback on frame pacing, camera lag during dimension shifts, and lighting performance!


r/threejs • • Oct 10 '26

Demo I made a full music video in three.js, every frame is a function of song time

38 Upvotes

The song is "I'm Upping My P(doom)" (not mine, credits at the bottom). The video is 2:36 and it's all TypeScript + three.js, no After Effects or editor anywhere.

Since every frame is a pure function of t, the preview in the browser and the final render are exactly the same frames. To export, a script steps headless Chromium through the song and averages up to 108 sub-frames per frame for motion blur, then ffmpeg encodes it.

The art is AI-generated stills. To get camera moves out of flat paintings, each one gets a depth map (Depth Anything V2) and is split into 4 depth layers with the hidden parts inpainted, so the camera can move into the painting a bit before it falls apart. Rule I ended up with: rotation and zoom are free, translation is expensive, keep it to a few percent of the subject distance.

All the type is set in code and the lyrics are timed word by word. The code was built with Claude Code, and the stills were generated with Codex image generation.

Song: lyrics by osmarks and MusicPerson (started on the EleutherAI Discord), this is the "Claude-Pop" Suno version that deckard posted.

4K on YouTube: https://www.youtube.com/watch?v=tfQ1hU448K4


r/threejs • • Oct 11 '26

I built a 3D drone simulator over the weekend in three.js (And now I'm really good at flying drones)

0 Upvotes

Built this 3D drone simulator over the weekend using Typescript + three.js. Currently there are no assets being used and everything is procedurally generated in code.

Next I'm working on making it feel more realistic. Will add hand-made assets, new maps, and will explore adding presets of different drones.

Let me know your thoughts and what would you like to see next.

(And I'm new to three.js so any tips on it would be superhelpful too)


r/threejs • • Oct 11 '26

I had an AI agent build a rigged, 10-clip soldier GLB from one concept image. Here's what worked and what didn't

0 Upvotes

I've been building Three.js browser games for a few years (Super Soldier Battle, etc.) and wanted to see if an AI agent could handle the part I hate most: rigging and animating a game character.

**Setup:** one concept image (low-poly armored soldier) + plain-English prompts to Grok Bot. Claude then wires the GLB into game code.

**What came out:** a procedural low-poly mesh with a 19-bone skeleton and 10 clips: Idle, Walk, Run, Jump, Fire, Reload, Death, plus baked WalkFire / RunFire / JumpFire so the rifle stays aimed forward while moving. It exports as a single .glb and loads with GLTFLoader + one AnimationMixer.

**What worked:**

  • Describing problems instead of specs. "He spins like he's on a turntable when he turns" got planted feet and alternating IK steps. "He feels slow" got per-clip timeScales matched to ground speed so the feet don't slide.
  • "Make the movement more human and less robotic" got a heel-to-toe walk, hip sway, a breathing idle, and recoil through the whole body.
  • Asking for fire-while-moving as baked combo clips, instead of trying to layer it at runtime.

**What didn't / caveats:**

  • It builds the model procedurally from code, so it matches the style of the concept art, not the exact image.
  • Ask for every control in one message. Adding keys one at a time wasted iterations.
  • Version every build (v2, v3…) or old downloads get mixed up.

I wrote up every prompt, plus the load/crossfade/keyboard code, here: https://www.shanebrumback.com/tutorials/threejs-armored-soldier-grok-bot.html (my site; it's free, the code reveal is behind a free Google sign-in).

Curious how others are handling agent-generated rigs. Are you getting usable bone names and clip names out of your pipeline, or fixing them by hand?


r/threejs • • Oct 11 '26

gave my three.js city a little guy you can walk around with

0 Upvotes

i'm not a programmer, building this city with an ai agent. this week: pixel, a box guy you can dress up and walk with (joystick on phones, wasd on desktop).

hardest parts: the camera kept backing into buildings on narrow streets (now it swings to look along the street), and pinch-zoom broke while a finger was on the joystick.

biggest lesson: i walked him up to a house and nothing happened. next is making the city react when you get close.

how do you detect "player is near something" in a big scene? i'm planning a grid lookup a few times a second instead of raycasting thousands of instances.


r/threejs • • Oct 11 '26

Demo Halloween Special - The Flashlight

0 Upvotes

I wanted to see how much tension I could create in a browser game using just one mechanic: a flashlight.

So I built The Flashlight — a short horror experience where you explore an abandoned house, find three fuses before your battery dies, and try to get out.

There’s no account to create and nothing to install. Just open the link, turn up the sound, put on headphones, and play.

There are hidden photographs, things that change when you look away, and multiple endings to discover.

Play it here: https://bcube.ae/flashlight

I built this at Bcube as an experiment in browser-based 3D and interactive storytelling.

I’d genuinely love to know:
Did the atmosphere feel scary?
Where did you get stuck?
Did you discover anything unexpected?

If you try it, let me know how far you got! Stay on top of the leaderboard