This was a pass at the Russian film Coma, a city made of whatever the dream still remembers. I abandoned it before it became a place you could walk. The road is still there. It climbs, and the rest of the scene is loose.
This is one HTML file on Three.js 0.186.1 and WebGPU. No model file. The highway is a curve swept into a deck, and the islands, blocks, water and bridge are boxes and cones dropped into the air around it. I use AI to write a lot of the placement. Which piece is allowed to stay attached to the road, and that the cars on the ramp do not notice the rest of the city is gone, come from 25+ years of JavaScript, game development, modding and level design.
The road
A CatmullRomCurve3 runs from the ground up into the haze. Frames are sampled along it: position, tangent, a right vector, an up vector. sweepTube walks those frames and builds a box section, so the asphalt, the curbs, the edge lines and the rails are the same function with a different offset and a different material. The yellow dashes are separate boxes, oriented on the frame, because a continuous sweep cannot leave gaps.
A few cars sit on the ramp and face along it. They are the only things still using the road as a road.
The rest
Everything else asks findSpot for a point that is not already taken, then gets a slow bob and a little spin. Road chunks trail off the break in the highway. A bridge fragment is always there, as one big anchor. Islands, city blocks, water shards, trees, rocks and one tumbling car fill in around that. Reload rolls another arrangement and another sky, because the seed is the time.
Drag right and the scene turns with your hand. The camera uses the same spherical mapping as OrbitControls: sine of theta on x, cosine on z, and theta decreases as the pointer moves right. The first version had those swapped, so left and right went backwards. Right-drag pans. The wheel zooms. If you leave it alone, it turns on its own until you grab it.
The frame is that file. It is a sketch. There is no collision, no road you can drive, and the pieces do not know about each other beyond not spawning on top of one another.
WebGPU only, on Three.js 0.186.1, with no WebGL fallback. If the browser has no WebGPU, the page stops. Open it through a server, because file:// will not load the modules. php -S localhost:8000 or npx serve in the folder is enough.
- Open it on its own
highway.html, the project-
SKILL.md
If you add a piece, give it to findSpot and let it float. Bolting the loose geometry back onto the ramp turns it into a normal overpass, and that is the thing this scene was trying not to be.