labgen
Authoring-time mesh generator for crashLab. `require("crashLab.labgen").buildAll(only?)` regenerates the hall's merged-per-material `.mesh` assets under `meshes/` (floor tiling with paint, pit, walls, roof, trusses, gantries and flood heads, cable trays, load-cell wall, signs, co…
labgen
Authoring-time mesh generator for crashLab. require("crashLab.labgen").buildAll(only?) regenerates the
hall's merged-per-material .mesh assets under meshes/ (floor tiling with paint, pit, walls, roof,
trusses, gantries and flood heads, cable trays, load-cell wall, signs, control room, props, test car).
Run it in edit mode after changing the layout; the runtime module crashLab.lab only references the results.
Interface
What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.
conforms to
zero/source-extract/v2strict
rect(name: string) → void
| arg | type | description |
|---|---|---|
| name | string |
card(g: Geo, cell: string, c: V3, n: V3, up: V3, w: number, h: number) → void
An atlas card centred at c, facing n, with its picture's "up" along `up`.
| arg | type | description |
|---|---|---|
| g | Geo | |
| cell | string | |
| c | V3 | |
| n | V3 | |
| up | V3 | |
| w | number | |
| h | number |
plaque(body: Geo, g: Geo, cell: string, c: V3, n: V3, up: V3, w: number, h: number, depth: number) → void
A card on a thin dark plate whose front face is the card itself (body goes in `body`).
| arg | type | description |
|---|---|---|
| body | Geo | |
| g | Geo | |
| cell | string | |
| c | V3 | |
| n | V3 | |
| up | V3 | |
| w | number | |
| h | number | |
| depth | number |
stripes(g: Geo, o: V3, along: V3, across: V3, L: number, W: number, period: number, colA: { number }, colB: { number }) → void
Diagonal stripes filling the band o + s*along + t*across (s in 0..L, t in 0..W).
| arg | type | description |
|---|---|---|
| g | Geo | |
| o | V3 | |
| along | V3 | |
| across | V3 | |
| L | number | |
| W | number | |
| period | number | |
| colA | { number } | |
| colB | { number } |
P(s: number, t: number) → V3
| arg | type | description |
|---|---|---|
| s | number | |
| t | number |
hazardFloor(g: Geo, x0: number, z0: number, x1: number, z1: number, y: number) → void
solid paint rectangle on the floor at height y floor-facing band of hazard stripes (axis-aligned rectangle)
| arg | type | description |
|---|---|---|
| g | Geo | |
| x0 | number | |
| z0 | number | |
| x1 | number | |
| z1 | number | |
| y | number |
buildFloor(out: { [string]: Geo }) → void
| arg | type | description |
|---|---|---|
| out | { [string]: Geo } |
buildPaint(out: { [string]: Geo }) → void
| arg | type | description |
|---|---|---|
| out | { [string]: Geo } |
R(x0: number, z0: number, x1: number, z1: number, kind: string, pri: number, col: { number }?, emit: (() → void
| arg | type | description |
|---|---|---|
| x0 | number | |
| z0 | number | |
| x1 | number | |
| z1 | number | |
| kind | string | |
| pri | number | |
| col | { number }? | |
| emit | (( |
paint(x0: number, z0: number, x1: number, z1: number, col: { number }, pri: number?) → void
| arg | type | description |
|---|---|---|
| x0 | number | |
| z0 | number | |
| x1 | number | |
| z1 | number | |
| col | { number } | |
| pri | number? |
hazard(x0: number, z0: number, x1: number, z1: number) → void
| arg | type | description |
|---|---|---|
| x0 | number | |
| z0 | number | |
| x1 | number | |
| z1 | number |
floorCard(cell: string, cx: number, cz: number, up: V3, w: number, h: number) → void
floor card: an opaque atlas panel; `up` is the picture's up (an axis), w along its right
| arg | type | description |
|---|---|---|
| cell | string | |
| cx | number | |
| cz | number | |
| up | V3 | |
| w | number | |
| h | number |
bay(x0: number, z0: number, x1: number, z1: number) → void
bays: lift, vehicle prep, barrier storage
| arg | type | description |
|---|---|---|
| x0 | number | |
| z0 | number | |
| x1 | number | |
| z1 | number |
uniq(t: { number }, lo: number, hi: number) → void
| arg | type | description |
|---|---|---|
| t | { number } | |
| lo | number | |
| hi | number |
flush(xEnd: number) → void
| arg | type | description |
|---|---|---|
| xEnd | number |
buildShell(out: { [string]: Geo }) → void
| arg | type | description |
|---|---|---|
| out | { [string]: Geo } |
door(x: number, z: number, nx: number, nz: number) → void
| arg | type | description |
|---|---|---|
| x | number | |
| z | number | |
| nx | number | |
| nz | number |
buildHighBays(out: { [string]: Geo }) → void
linear high-bay LED fixtures over the hall
| arg | type | description |
|---|---|---|
| out | { [string]: Geo } |
buildGantries(out: { [string]: Geo }) → void
| arg | type | description |
|---|---|---|
| out | { [string]: Geo } |
buildTrays(out: { [string]: Geo }) → void
Cable trays
| arg | type | description |
|---|---|---|
| out | { [string]: Geo } |
buildReactionWall(out: { [string]: Geo }) → void
Load-cell reaction wall
| arg | type | description |
|---|---|---|
| out | { [string]: Geo } |
buildSigns(out: { [string]: Geo }) → void
| arg | type | description |
|---|---|---|
| out | { [string]: Geo } |
wallSign(cell: string, c: V3, n: V3, w: number, h: number, lit: boolean?) → void
wall plate: a dark backing slab whose front face IS the printed card (no overlay)
| arg | type | description |
|---|---|---|
| cell | string | |
| c | V3 | |
| n | V3 | |
| w | number | |
| h | number | |
| lit | boolean? |
buildControlRoom(out: { [string]: Geo }) → void
| arg | type | description |
|---|---|---|
| out | { [string]: Geo } |
toolCart(out: { [string]: Geo }, pos: V3, yaw: number) → void
Props
| arg | type | description |
|---|---|---|
| out | { [string]: Geo } | |
| pos | V3 | |
| yaw | number |
place(g: Geo, f: number) → void
| arg | type | description |
|---|---|---|
| g | Geo | |
| f | number |
jerseyBlock(out: { [string]: Geo }, pos: V3, yaw: number) → void
| arg | type | description |
|---|---|---|
| out | { [string]: Geo } | |
| pos | V3 | |
| yaw | number |
honeycombPallet(out: { [string]: Geo }, pos: V3) → void
| arg | type | description |
|---|---|---|
| out | { [string]: Geo } | |
| pos | V3 |
twoPostLift(out: { [string]: Geo }, pos: V3) → void
| arg | type | description |
|---|---|---|
| out | { [string]: Geo } | |
| pos | V3 |
testCar(out: { [string]: Geo }, pos: V3, yaw: number) → void
A plain saloon test car up on four jack stands (crash-test quadrant targets on its sides).
| arg | type | description |
|---|---|---|
| out | { [string]: Geo } | |
| pos | V3 | |
| yaw | number |
Pz(k: number, x: number) → V3
| arg | type | description |
|---|---|---|
| k | number | |
| x | number |
fan(pts: { V3 }, x: number) → void
the side outline is not convex at the wheel arches' level; fan from a centre point
| arg | type | description |
|---|---|---|
| pts | { V3 } | |
| x | number |
C(k: number, s: number) → V3
| arg | type | description |
|---|---|---|
| k | number | |
| s | number |
buildProps(out: { [string]: Geo }) → void
| arg | type | description |
|---|---|---|
| out | { [string]: Geo } |
screenQuad(w: number, h: number) → Geo
Screens: a unit set of quads centred on the origin facing +Z
| arg | type | description |
|---|---|---|
| w | number | |
| h | number |
buildAll(only: { string }?) → void
`only` (optional) limits which meshes are rewritten, e.g. { "deck" }.
| arg | type | description |
|---|---|---|
| only | { string }? |
wanted(n: string) → boolean
| arg | type | description |
|---|---|---|
| n | string |
Sub-parts
Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.
Showing up to 3 levels deep. Open a part to see what it holds further down.
Problems
Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.
agent_score is exposed.+ quality × 0.35
+ performance × 0.25
± compat factor
Usability ratings
Did the part work as advertised when consumers tried to drop it in. Separate from upvotes: those are taste; this is "did it function".
Scoped to this part · feeds back into the world's score.