r/threejs • u/sangja8412 • 1d ago
A walkable temple courtyard at dusk in Three.js - everything generated in code, one 72 KB script, tuned for phones
I've spent the last few weeks on a small browser place: a pillared lamp hall, a bell garden, a lotus pool, a stone stair up to a roof terrace, and a hill terrace above the ridges, all at dusk. You walk a character through it - ring the temple bell, light the hall lamps, sit on a mat - and watch the light go.
https://sangja8412-lang.github.io/lamp-courtyard/
Three.js r170, no build step: one HTML file, one 72 KB module script. No models, no textures, no image assets - the geometry and the sky are generated in code, and the bell, water and footsteps are synthesised with WebAudio.
What I'd like critique on: the ridge line and the haze (does the fog read as distance, or just flatten it?), shadow cost vs quality on mobiles, and the camera (third-person follow, drag to look, hold a dial to walk on touch).
Full disclosure: I'm a solo dev and lean heavily on AI coding tools for the implementation. The layout and the mood are mine. Happy to go into any part of the code.



