five-on-it / apps/tools/src/block-library
apps/tools/src/block-library
The block library: the eighteen unit source meshes a level is built from in the editor (block:<kind> under the _blocks group), each with its colour and its block script attached. Designers never scale the sources; they place instances of them and scale those. The shapes placed as meshes (the boxes, the wedge, the stairs) are the game's own BLOCK_MESHES carried through the mirror and flat-shaded; the markers that become points and lines (the ground square, a flat strip along x, an arrow with its nose at +z for spawn points, a person-sized box for range dummies, a thin slab for roads) and the interactables (a door's panel standing on its origin, scaled to its size; a crate-sized box for a container or the items on the ground, a lens-sized box for a security camera, a person standing on the origin for an NPC spawner, a car-sized slab for a vehicle spawner's bay, a garage's bay standing on its origin, scaled to its size, a shop's counter, a district's area as a thin square on the ground, scaled to it) are built here. All of them are symmetric in x, so the mirror leaves them unchanged.