five-on-it / apps/level-editor/src/scripts/blocks/bascule
apps/level-editor/src/scripts/blocks/bascule
Marks a node of the editor scene as a leaf of a bascule bridge: the middle of its deck, lowered, at the node's origin, scaled to its width (x), thickness (y) and length (z), turned with yaw only; its hinge is at its back end (local −z, the square end of the library's mesh), its tip at +z. It tilts up by angle (degrees, over 0 and up to 85) when a driver of at least stars Wanted stars (1 to 10) comes; two leaves facing each other make a bridge with a gap as they rise. Nothing of it is placed as a mesh: the simulation makes its body and the game draws it. The library's block:bascule carries it: place instances of that mesh for npm run level:export to read.