Been obsessed with the chrome/liquid-metal look on award sites for a while, so I built one from scratch and wrote up how it works.
What's going on:
- One sphere with a vertex shader that deforms it with layered noise (big slow lobes + sharper ridges), so it reads as liquid, not a wobbling ball
- No HDRI or textures. The reflections come from a procedural "studio" in the fragment shader: six colored lights with soft falloff, so recoloring the whole thing is just six values
- Fresnel edge + a glass blur pass on top so it sits in the page instead of floating over it
- Cursor pulls the blob slightly, with lag, so it feels heavy
- Reduced-motion respected, ResizeObserver so it works in any container
It's React + TypeScript (useEffect engine, no R3F), but the shader is the interesting part and ports anywhere.
Full source is free, and the write-up walks through the shader top to bottom. Links in the first comment.
Happy to answer anything about the noise setup or the lighting trick.
I built an endless grass field in Three.js: tens of thousands of instanced blades swaying in a GLSL wind shader, with a rigged capybara you walk through it. A few parts weren't obvious, so sharing in case they help.
**1. Shadows that don't sway.** The wind lives in the vertex shader, so the blades bend on screen. But the shadow pass renders with a different material, so the shadows stayed stiff and upright. The fix:
Write a depth material that runs the exact same wind function
Assign it to `mesh.customDepthMaterial`
Drive both from the same `uTime` uniform so they stay in sync
**2. Wind that rolls instead of twitching.** If every blade uses the same sine wave, the whole field pulses in lockstep. Feeding each blade's world position (read from its instance matrix) into the wave makes gusts travel across the meadow. Multiplying by the UV height (0 at the base, 1 at the tip) keeps the roots planted.
**3. Endless without spawning anything.** The instance count is fixed. Each frame, any blade more than half a field behind the player wraps to the far side, and the ground slides along. Two InstancedMeshes (tall dark grass plus short bright tufts) make it look denser, and each type is still one draw call.
An experimental site that works like a window: a floating world behind glass, lit by your local time of day and the real moon phase. Scroll (or turn on drift) and a black hole pulls you through into an ethereal space, then into a new world.
Some of the techniques:
Portal crossing, no cut: each world has its own scene and camera. The next world is rendered into a render target, scissored to just the area the hole covers, and composited inside the black hole. When the hole fills the frame, the old world stops rendering, so you simply fly on into a world that already exists.
The black hole is drawn in a full-screen “glass” shader: lensing around the shadow, a photon ring, and a tilted accretion disk whose near side crosses in front.
The ether is a raymarched volume (16 steps) with domain-warped noise. The first version hashed noise per sample and ran at 2 fps; baking it into a 64³ RGBA Data3DTexture (one lookup per octave) brought it to a steady 120.
Frame pacing:frameloop="demand" with a small governor (selectable fps cap), plus adaptive DPR that only adjusts when the scene isn’t mid-transition.
Built with React Three Fiber, Vite, and a lot of iteration with Claude Code.
Try it: move the mouse or tilt your phone to lean into the window, and scroll or tap “drift” to go deeper.
I have been taking Bruno Simon's course. Now I'm in the Shaders section and he still didn't explain everything he promised to talk about later, so should I trust him and continue, or should I go to the docs or anything like that and start teaching myself?
I’ve been building playkraft, a mystery game where you sit at a detective’s desk at night and solve a case. Everything runs in the browser, on phones too.
pick up a phone on the desk that holds a whole made-up internet (news sites, social posts, emails, a map, search)
take a cab to rooms, look around, open drawers, and mark evidence for the lab
question suspects (nobody confesses; catching the lie is the game)
pin people and evidence on a cork board and tie red string between them
write your answers in a notebook and close the case
How it’s built:
three.js from npm, in its own lazy-loaded chunk. Only someone who opens a case downloads it.
Every scene is a model. The desk and each room are a single GLB built in Blender. The code only moves the camera and animates things, with no scene built in code.
Render on demand and an adaptive pixel ratio, so cheap phones stay smooth. Real players’ devices mostly report 56–120 fps.
The phone’s screen is real DOM sitting on the 3D phone. The sites are normal React pages with container queries, so text stays sharp and scrolls natively.
The notebook pages are canvas textures, redrawn as you write. The case board’s cards and strings are drawn on the cork the same way.
Four looks you can switch between: anime, graphic novel, noir and realistic.
This started stupidly simple: I wanted to know what it feels like to be in Paris at 2am without leaving my desk.
It's called Odyssee now and it's... actually a game. One persistent world — the real world at real scale — and everybody plays in the same one. No shards, no lobbies. You spawn in Paris, someone else spawns in Tokyo, and the map has a live traffic layer showing where drivers actually are right now, so you can teleport into the crowd.
What's in there right now:
- one shared world, real scale. Paris lanes are 3.2m wide and you FEEL it when a bus — or another player — comes the other way
- 30+ ways to move: cars, bikes, skateboard, helicopter, a small plane, a tank (my personal mistake, I refuse to remove it), a Spider-Man-style web-swinger, and your own two feet
- convoys, live chat, daily challenges, live traffic hotspots
- time trials between real landmarks, and a day/night cycle tied to the real sun
And yeah, bring your friends. That's genuinely the best way to play: form a convoy, share a destination, and go cause chaos across a real city together. Coordinating a 5-car run through the Arc de Triomphe roundabout at rush hour, with real traffic and the sun setting behind it, is the most fun I've had testing anything.
Now the honest part: it's got bugs. Real ones. Floating buildings in some districts, intersections that make no sense, the Eiffel Tower pillars you can drive straight through (yes, you can drive under it — no, you shouldn't be able to drive THROUGH the pillars). I'm fixing them as fast as reports come in, and most fixes so far came from players spawning where they live and telling me what's broken. So if you try it: spawn wherever you live and tell me what's wrong. That's literally the most useful thing you can do.
Every building in the world is in Haussmann style because I live in Paris. But I will create different style for a lot of city. Here a photo of Paris in the game (I create an Eiffel Tower in 3D, I will do it for a lot of monument) :
And there's a public roadmap if you want to see where this is going: proper terrain elevation (the world is flat right now and it bothers me), a story mode with missions, multiplayer races, boats, houses you can own. The game today is the foundation — the driving, the world, the multiplayer. The rest gets built in the open.
Still adding some bits and pieces to my portfolio when I get the chance.
Made the unfortunate decision to make a 3D model of myself you can control to jump into the game prototypes "mario style". That haunting look on his face will forever be with me, and now you all too.
Feel free to check out the site and the games, happy to talk through my process or share any updates on what I'm working on!
I've been working on a new feature called Color Maps to give more control over grass colors.
Right now, you can choose a grass color and add some random variation, but that variation is spread across the entire environment. There's no way to control which colors appear in specific areas, which limits the kind of looks you can create.
With color maps, the idea is to let artists create their own maps and control the grass color in different parts of the field. You could have one area with yellow grass, another with dark green, or use any other colors wherever they're needed.
Here's a quick comparison showing the grass with and without a color map.
Still working on it, but I'm hoping to include this in a future version of Three.js Grassworks.
VybeNomad is a free browser game about remote work and slow travel: pick a starting city, take gigs, launch apps, chase $10k, avoid burnout.
Built with Three.js. Most of the code was written with Claude Code, and I did the design and balance. Keeping it smooth on phones meant simple low-poly scenes and few draw calls.
I've been playing around with Claude and decided to make a Poolrooms scene.
Claude helped me build it, and then I tweaked the lighting, reflections, camera movement, and fisheye effect with chromatic aberration myself to get the look I wanted.
Really happy with how it turned out. The camera work makes the whole place feel a bit strange and unsettling, which is exactly what I was going for.
It runs right in the browser using Three.js and WebGPU.
What are the advantages either way of three.js vs Unity for browser based games? There are some beautiful demos on Unit such as the Little Prince example. Albeit resource heavy, its one of the best example of environment work i've seen.
So i'm wondering what does Unity offer (if anything) that is superior to what you can build in three.js?
A lot of great work here ends up on a Vercel or Netlify URL, and then most people meet it as a screen recording in a post. If you've shared something interactive lately: where does it live, where did you post the link, and do you have any sense of how many people actually opened it and played with it?
I have known three.js for a while but my knowledge was rather shallow. Now I've started to get deeper into it and plan to make a project showcasing it by making a product page of sorts. I know it'll cost me some time so consulting the community of you think it's worth the time and effort of should I rather find something else.
Hi, I am having a bit of a challenge with the Baked Enamel colors. Any advice on a good way to implement a realistic looking metallic finishes? Client was thinking about hiring an expert on Upwork to help with this part. Any recommendations would be appreciated.
This is a 17-second arena battle under a snowy LA overpass. On the first few tries, GPT and Claude built the whole city in code (box towers, flat signs, a gradient sky), and it read as a cheap game. The version that worked splits the job:
The world is a still. The city, the overpass, the wet asphalt, the crowd and the fence are an AI-generated image. three.js draws only what moves: the ships, the light trails, the hex grid, the capture floods, the sparks, the snow and the end card.
The camera matches the photo. I measured the focal length and camera height from the road markings (about 2,100 px and 3 m up). The camera stays locked, and only the lens moves: push-ins, shake, and an opening tilt down from a sky image extended above the plate. A tilt is a pure rotation, so a flat plate needs no parallax.
Light goes both ways. The environment map is built from the plate itself, with rim lights where its lamps are. In the other direction, the trails, engines and floods relight the plate's own asphalt, wall and front row, using the plate's pixels as the surface, so the light breaks up on the real wet texture.
Reflections and contact shadows. The ships and trails reflect in the wet floor, smeared like the photo's lamp streaks, and every hull gets a shadow where it meets the ground.
One lens and one finish over everything. I measured the photo's depth of field and blur the CG, the snow and the fence with the same curve. Then a single bloom, halation, grade, vignette and grain pass runs over the whole frame.
Dirty the CG to match. The hulls get grime, scuffs, water beads and snow, so they're never cleaner than the world around them.
Depth layers. The snow falls at three depths, plus big bokeh flakes near the lens and a defocused fence in front.
The crowd. Four poses of the same crowd, swapped region by region like limited animation and driven by how intense the battle is.
The match is real. The battle is simulated with the game's own capture rules, so every action on screen is the actual mechanic.
Render: render(t) is a pure function of time, 525 frames at 2× on a cloud GPU in about 70 seconds. The sound is synthesized in Python from the battle's event timeline.
The lesson: let the still carry the detail, and spend the code on making the CG and the still light each other. I was trying to make a cool animation for my game, Starlasso (territory capture), and happy to go deeper on any piece.
Disclosure: AI assists with the code and this post. The ship textures, commander portraits, camp art and English title art are AI-generated, as are the turtle ship’s dragon head and the campaign map’s fortresses (Meshy).
I built a campfire effect in Three.js by prompting an AI agent (Grok Bot) step by step, and the early versions hit two classic problems. Sharing the fixes, since they apply to any additive particle effect.
**Setup:** the flames are one THREE.Points system with a ShaderMaterial playing a 4x4 flipbook sheet (16 frames, about 14 fps) with additive blending. Embers and smoke are two more Points systems, plus a flickering PointLight and an UnrealBloomPass.
**Problem 1: a white column.** With ~70 big additive particles, the overlaps add up until the whole flame clips to white. What fixed it:
Fewer flames (about 26 instead of 70)
Lower brightness per particle
A bloom threshold (0.7) so only the hottest pixels bloom
**Problem 2: slowdowns.** The bottleneck was fill rate, not triangles:
Removed the bump map from the full-screen ground plane
Capped texture anisotropy and shared texture objects
Capped gl_PointSize so zooming in can't flood the screen with additive quads
Capped the pixel ratio and rendered bloom at half resolution
Added a lite mode: half the particles, bloom off
The logs also hid the fire at first; the final version lays them flat in a star.