five-on-it / packages/catalogue/src/region/tunnels
packages/catalogue/src/region/tunnels
A road's tunnels (roads.ts marks them: a road with tunnels: "auto" held under a hill): the ground under a tunnel is a cutting with steep walls at the road's height (terrain.ts), and over it these pieces, built as meshes in the game's frame:
- The roof: the hill's own surface rebuilt over the cutting, a metre thick and a little over the land (its bumps), in the biome's colours (
paint), its sides going down into the hill. A structure, so it fades over a player under it (the client'soverhead.tsknows a piece namedtunnel-…-rooffor one) and the AI walks on it (a floor over the road,@foi/world'snav-layers.ts). - The portals: a stone face across each end, the mouth the road's width and
TUNNEL_BUILD.mouthhigh, two lamps beside it. - The lights: a lamp on both walls every 24 m inside, drawn only (they glow at night as the street lamps' heads do).
Flat colours, faces turned out.