feat(editor): add --gen-mesh-ladder utility primitive

43rd procedural mesh: 2 vertical rails + N evenly-spaced
horizontal rungs. Sits flat against +Z (the climbing face)
so it can be parented to walls, wagons, ship hulls, mage
tower trapdoors, attic openings, dungeon shafts.

Defaults to 3.0m tall × 0.6m wide with 8 rungs (typical
home/loft ladder). Rung spacing computes as height/(rungs+1)
so the first rung sits a half-step from the floor and the
last rung the same distance from the top — keeps the ladder
visually symmetric regardless of rung count.
This commit is contained in:
Kelsi 2026-05-09 07:36:02 -07:00
parent 30fbd39272
commit 55a768f1f3
3 changed files with 117 additions and 0 deletions

View file

@ -182,6 +182,8 @@ void printUsage(const char* argv0) {
std::printf(" Lamppost: square base + tall pole + lantern body + cap (default 3.0/0.12/0.4/0.35/0.5)\n");
std::printf(" --gen-mesh-bed <wom-base> [length] [width] [legH] [matThick] [headH] [footH]\n");
std::printf(" Bed: 4 legs + mattress + headboard + footboard + pillow (default 2.0/1.2/0.30/0.20/1.0/0.4)\n");
std::printf(" --gen-mesh-ladder <wom-base> [height] [width] [rungs] [railThick] [rungThick]\n");
std::printf(" Ladder: 2 vertical rails + N evenly-spaced horizontal rungs (default 3.0/0.6/8/0.06/0.04)\n");
std::printf(" Procedural tree: cylindrical trunk + spherical foliage (default 0.1/2.0/0.7)\n");
std::printf(" --displace-mesh <wom-base> <heightmap.png> [scale]\n");
std::printf(" Offset each vertex along its normal by heightmap brightness × scale (default 1.0)\n");