Log inGet started
Package

Vault.component

Newest version

README.md

Vault

The Combing Vault itself: the architecture, the air and the grade.

Attach it to the scene's Vault director entity. It needs nothing beside it — it reads game.shared.game for the nave and bale numbers, and it builds its own geometry, lights, atmosphere and post-process stack at start().

What it puts in the room

  • The shell dressing. Black basalt lining over the scene's bare walls: a pilaster rhythm down both sides, blind arches between the piers, a bronze field behind each arch, a brass cornice, the tally cut into the west wall where the counter overflowed, and a pointed barrel vault (springing at 12 m, crowning at 20 m) with brass transverse ribs and a ridge rib, so the ceiling reads as height rather than a lid.
  • East clerestory. Five arched windows of warm emissive glass with brass tracery and stone arch bands. Each one throws a light shaft — an additive prism from the glass to the floor, faded along its length by game/vault/tex/beam.texture — which is what carries the godray look.
  • The gallery. A brass walkway at 6.2 m along both walls with balusters, rails and corbels; hanging censers on chains in the aisle, each with an ember core and its own warm light.
  • The bale bodies. For every GAME.BALES entry, a dark bound mass behind the needle face (fx = cx + normalX * halfDepth, so nothing pokes through the needles), a bronze plinth, a heavy brass top edge, corner posts and clamps, a frame around the 14 × 8 needle core, binding straps and studs.
  • The shrine at the far end: steps, a brass-framed niche with a glowing panel and a gilded monolith, flanking columns, a canopy and a brass rose deep in the dark above it.
  • Dust. 460 motes in one instanced draw (renderer.mesh.drawInstanced with a GPU transform buffer), drifting slowly through the shafts.
  • Light. Five window shafts, five warm washes at gallery height, a close lamp in front of every bale face, censer coals, vault warmth, a cool fill at the entrance and teal pools at the foot of the walls — warm amber against cold shadow.
  • Air and grade. VolumetricLighting (thin) and HeightFog (cool, low), and a PostProcess stack of bloom, colour grade, depth haze and vignette with a display exposure, plus DepthOfField on the camera.

Performance

Everything is merged into one mesh per material — five static meshes for the whole room, one instanced draw for the dust — so the dressing costs six draws and one small buffer write per frame.

Rebuilding

Geometry is made at runtime from game.shared.game's numbers, so it always agrees with the needlefield's bale grid. start() tears down the previous VaultDressing root before building, so a hot reload replaces the room rather than stacking a second one.