preseed/teslahall.module — the industrial high-voltage test hall around the
tesla part's coil. Everything static is baked into a handful of merged
meshes (one per material): the building shell, five roof trusses with
purlins and a gantry crane, a catwalk, a transformer bank, a capacitor
rack, a Marx insulator column, a control console, cable trays with
catenary feed lines, high-bay lamps, warning beacons, a safety railing,
HV signage — and the floor/wall/ceiling dressing that makes the hall
lived-in: a galvanized supply duct with drops and a roof unit, oil drums,
a workbench with pegboard, an oscilloscope cart, pallets and crates, a
spare toroid on a dolly, a gas-cylinder rack, fire extinguishers, breaker
panels, cable reels, festoon loops on the gantry rail, sodium wall packs
and an exit sign. Returns the grounded strike targets the plasma arcs
jump to, the wall-pack lamp positions, and the material handles the part
animates (beacons, LEDs, lamp glass).
meshWithTangents(geom: ?, name: ?) → void
A runtime mesh built from positions/normals/uvs alone carries a tangent
channel of ZEROES — the engine allocates it but derives nothing — and a
zero tangent makes the shader's tangent-to-world basis degenerate, so a
normal map on such a mesh does not merely do nothing, it drives the shading
normal to garbage and the surface goes black wherever the map is strongest.
Every textured surface in this hall therefore needs its tangents built here,
from the same triangles and UVs the shader samples through.
Lengyel's method: accumulate each triangle's UV-space tangent onto its three
vertices, then orthonormalize against the vertex normal.
| arg | type | description |
|---|
| geom | ? | |
| name | ? | |
addBox(list: ?, w: ?, h: ?, d: ?, pos: ?, rot: ?) → void
| arg | type | description |
|---|
| list | ? | |
| w | ? | |
| h | ? | |
| d | ? | |
| pos | ? | |
| rot | ? | |
addCyl(list: ?, r: ?, h: ?, segs: ?, pos: ?, rot: ?) → void
| arg | type | description |
|---|
| list | ? | |
| r | ? | |
| h | ? | |
| segs | ? | |
| pos | ? | |
| rot | ? | |
addTorus(list: ?, R: ?, r: ?, segs: ?, rings: ?, pos: ?, rot: ?) → void
| arg | type | description |
|---|
| list | ? | |
| R | ? | |
| r | ? | |
| segs | ? | |
| rings | ? | |
| pos | ? | |
| rot | ? | |
addSphere(list: ?, r: ?, pos: ?) → void
| arg | type | description |
|---|
| list | ? | |
| r | ? | |
| pos | ? | |
addTube(list: ?, a: ?, b: ?, r: ?, segs: ?) → void
straight tube between two points (cylinder is Y-axis; rotate onto the
chord; slight overlength so chained segments overlap at bends)
| arg | type | description |
|---|
| list | ? | |
| a | ? | |
| b | ? | |
| r | ? | |
| segs | ? | |
addCatenary(list: ?, a: ?, b: ?, sag: ?, n: ?, r: ?) → void
sagging cable from a to b as a chain of tubes
| arg | type | description |
|---|
| list | ? | |
| a | ? | |
| b | ? | |
| sag | ? | |
| n | ? | |
| r | ? | |
addInsulator(list: ?, x: ?, y: ?, z: ?, r: ?, units: ?) → void
ceramic insulator stack: alternating drums and shed discs, returns top y
| arg | type | description |
|---|
| list | ? | |
| x | ? | |
| y | ? | |
| z | ? | |
| r | ? | |
| units | ? | |
addSign(yellow: ?, black: ?, x: ?, y: ?, z: ?, w: ?, h: ?, yaw: ?) → void
yellow HV warning board with black frame and bolt glyph
| arg | type | description |
|---|
| yellow | ? | |
| black | ? | |
| x | ? | |
| y | ? | |
| z | ? | |
| w | ? | |
| h | ? | |
| yaw | ? | |
at(ox: ?, oy: ?, d: ?) → void
| arg | type | description |
|---|
| ox | ? | |
| oy | ? | |
| d | ? | |
build(ctx: ?) → void
Interior: 56 wide (x) x 40 deep (z) x 21 high. Coil at the origin.
addPallet(x: ?, z: ?) → void
spawnMerged(name: ?, parts: ?, mat: ?, shadows: ?) → void
| arg | type | description |
|---|
| name | ? | |
| parts | ? | |
| mat | ? | |
| shadows | ? | |
maps(set: ?, opts: ?) → void
| arg | type | description |
|---|
| set | ? | |
| opts | ? | |