assets/spine/spineforge.module — the SPINE slice's geometry forge.
A small flat-shaded mesh builder plus the shape recipes the Ironspine is made
of. Everything is written into one `renderer.mesh.create` geometry per shape,
so a vertebra with its ribs, flanges, bolt rows, plating and conduit is ONE
draw call instead of forty entities.
Vertex colour carries two things at once:
RGB the surface's own albedo tint (iron, brass, verdigris, rust, salt)
A the WEAR MASK the `wet_iron` shader reads — 0 pristine, 1 eaten
so a single material dresses the whole tower and the geometry decides where
it is worn. Colours are 0..1 linear and multiply straight into albedo.
Owned by the SPINE slice.
vcross(a: ?, b: ?) → void
vlerp(a: ?, b: ?, t: ?) → void
| arg | type | description |
|---|
| a | ? | |
| b | ? | |
| t | ? | |
frameOf(axis: ?, hint: ?) → void
two unit vectors perpendicular to `axis`, forming a right-handed frame with it
| arg | type | description |
|---|
| axis | ? | |
| hint | ? | |
c(tint: ?, wear: ?) → void
colour + wear packed for a vertex
| arg | type | description |
|---|
| tint | ? | |
| wear | ? | |
vert(p: ?, nrm: ?, col: ?, u: ?, v: ?) → void
| arg | type | description |
|---|
| p | ? | |
| nrm | ? | |
| col | ? | |
| u | ? | |
| v | ? | |
tri(a: ?, b: ?, c: ?) → void
| arg | type | description |
|---|
| a | ? | |
| b | ? | |
| c | ? | |
poly(pts: ?, cols: ?, nrm: ?) → void
A convex polygon, flat-shaded. `cols` is one colour, or one per point.
| arg | type | description |
|---|
| pts | ? | |
| cols | ? | |
| nrm | ? | |
quad(p0: ?, p1: ?, p2: ?, p3: ?, cols: ?, nrm: ?) → void
| arg | type | description |
|---|
| p0 | ? | |
| p1 | ? | |
| p2 | ? | |
| p3 | ? | |
| cols | ? | |
| nrm | ? | |
polyTwoSided(pts: ?, cols: ?) → void
Both faces of a thin polygon — for torn plating and cable webbing.
| arg | type | description |
|---|
| pts | ? | |
| cols | ? | |
box(o: ?, ax: ?, ay: ?, az: ?, cols: ?) → void
A box from a centre and three half-extent vectors (they may be rotated).
| arg | type | description |
|---|
| o | ? | |
| ax | ? | |
| ay | ? | |
| az | ? | |
| cols | ? | |
P(sx: ?, sy: ?, sz: ?) → void
| arg | type | description |
|---|
| sx | ? | |
| sy | ? | |
| sz | ? | |
boxAt(centre: ?, half: ?, cols: ?) → void
An axis-aligned-ish box given a centre and half sizes on a frame.
| arg | type | description |
|---|
| centre | ? | |
| half | ? | |
| cols | ? | |
prism(o: ?, axis: ?, h: ?, r0: ?, r1: ?, sides: ?, col0: ?, col1: ?, opts: ?) → void
A tapered n-gon tube. `opts`: capA / capB (bool), twist (rad), hint (ref dir),
ribs (a function i -> extra radius, for a fluted profile).
| arg | type | description |
|---|
| o | ? | |
| axis | ? | |
| h | ? | |
| r0 | ? | |
| r1 | ? | |
| sides | ? | |
| col0 | ? | |
| col1 | ? | |
| opts | ? | |
tube(pts: ?, radii: ?, sides: ?, cols: ?, opts: ?) → void
A swept tube along a polyline, with parallel-transported frames.
| arg | type | description |
|---|
| pts | ? | |
| radii | ? | |
| sides | ? | |
| cols | ? | |
| opts | ? | |
torus(centre: ?, axis: ?, R: ?, r: ?, majorN: ?, minorN: ?, cols: ?) → void
A torus — chain links, the crown ring, shackles.
| arg | type | description |
|---|
| centre | ? | |
| axis | ? | |
| R | ? | |
| r | ? | |
| majorN | ? | |
| minorN | ? | |
| cols | ? | |
vertebra(opts: ?) → void
A ribbed drum: barrelled centrum, two heavy end flanges with bolt rows, four
to six transverse rib spurs, a dorsal blade, hull plating, and a conduit run
up one face. `seed` picks the variant.
rung(span: ?, drop: ?) → void
A salvage rung: a bent bar into the wall, span horizontal, worn bright.
| arg | type | description |
|---|
| span | ? | |
| drop | ? | |
lip(width: ?) → void
A cut ledge: a plate jutting out of the wall with a lip you can hook.
pipe(length: ?) → void
A conduit run clamped to the wall — grip is the pipe itself.
| arg | type | description |
|---|
| length | ? | |
bolt( ) → void
A structural bolt head standing proud of the plate — a small, positive hold.
crumble( ) → void
A hold that is already failing: cracked flange, flakes hanging off it.
It reads RED and jagged so a climber can tell it apart at a distance.
piton( ) → void
A piton anchor: driven spike, shackle, tag, and a sodium lamp. This is the
checkpoint, so the lamp is the thing that reads from below.
pitonLens( ) → void
The lamp's glowing lens, drawn with the emissive material.
cable(a: ?, c: ?, sag: ?, radius: ?, segments: ?) → void
A catenary cable between two points, with an optional snapped free end.
| arg | type | description |
|---|
| a | ? | |
| c | ? | |
| sag | ? | |
| radius | ? | |
| segments | ? | |
chain(links: ?, linkR: ?, drift: ?) → void
A hanging chain: n torus links, alternating plane, drifting as it falls.
| arg | type | description |
|---|
| links | ? | |
| linkR | ? | |
| drift | ? | |
wreckSlab(size: ?, seed: ?) → void
A torn hull slab caught on the structure — big, angular, unmistakable.
| arg | type | description |
|---|
| size | ? | |
| seed | ? | |
seaRib(length: ?, curve: ?, thickness: ?, seed: ?) → void
A rib of the colossus breaching the sea: a long tapering arc of iron.
| arg | type | description |
|---|
| length | ? | |
| curve | ? | |
| thickness | ? | |
| seed | ? | |
crownRing(R: ?) → void
The platform ring the ignition holds sit on: a heavy torus on buttresses,
with eight handles and a lantern cage in the middle.
beaconLens(R: ?) → void
The beacon lens itself — the thing that lights.
baseDeck(w: ?, d: ?) → void
floodMast(height: ?) → void
A floodlight mast on the deck, aimed up the tower.
| arg | type | description |
|---|
| height | ? | |