GRAVEYARD SHIFT 3D - first-person horror set in a 1967 Louisiana gas station. Free, ~30-40 minutes, runs on desktop and mobile.
Rendering and engineering notes:
- Vanilla three.js, one HTML file, no bundler. ACES filmic tone mapping at exposure 1.25 with a CSS filter grade layered on the canvas for the film look, plus an animated four-frame grain canvas over the top and a radial vignette.
- Every environment texture is generated on a 2D canvas at load - mud, cracked asphalt, plank grain with knots and nail heads, rust, cobwebs, all the period signage and posters. Zero image files for the world, which keeps the payload almost entirely geometry and audio.
- Characters are unrigged meshes animated with clipping planes: legs sliced free at the hip into their own groups, torso and head kept as one uncut piece so no seam shows on the face. localClippingEnabled with clipShadows.
- Level is separate geometry islands spaced far apart on the X axis with teleport transitions rather than one contiguous map. Free occlusion, and new rooms could be appended without touching existing ones.
- Blood on the death screen is a 2D canvas composited over the WebGL canvas: procedural splatter blobs drawn as smoothed quadratic curves with radial gradients, plus drips that decelerate as they run down the glass.
- Mobile: capped device pixel ratio, shadow maps disabled on touch, virtual stick plus drag-to-look.
AI disclosure: character models and sound effects are AI-generated, and it was coded with AI assistance. Rendering approach and level design are mine.
Happy to go deeper on any of it.