feat(editor): add --gen-mesh-crate-stack scene primitive

63rd procedural mesh primitive. The first to explicitly
compose a *scene* of multiple objects rather than a single
structure: an N×M×K arrangement of cube crates with a small
gap between each so they read as discrete shipping boxes
rather than one merged solid.

Default 2×2×2 = 8 crates with 0.40 m sides on a 0.02 m gap
gives a tight pyramidal pile. Larger configurations (e.g.
4×3×2 = 24 crates) read as warehouse pallets.

Uses every shared helper added this batch — addFlatBox for
each crate, finalizeAsSingleBatch for the trailing batch,
stripExt for the .wom suffix, parseOptInt/Float for the
optional dimension args. Each crate emits the standard
24-vert / 12-tri box, so an N×M×K stack is a clean
N*M*K-multiple in vertices and triangles.

Useful for warehouses, cargo holds, dock loading bays,
market stalls, dwarven mining caches, pirate stash piles.
Watertight under weld — the gap keeps adjacent crates
from sharing corner positions.
This commit is contained in:
Kelsi 2026-05-09 11:52:20 -07:00
parent 02503e87df
commit a10efed8f5
3 changed files with 74 additions and 1 deletions

View file

@ -52,7 +52,7 @@ const char* const kArgRequired[] = {
"--gen-mesh-tent", "--gen-mesh-firepit", "--gen-mesh-woodpile",
"--gen-mesh-canopy", "--gen-mesh-haystack", "--gen-mesh-dock",
"--gen-mesh-pergola", "--gen-mesh-chimney", "--gen-mesh-bedroll",
"--gen-mesh-workbench",
"--gen-mesh-workbench", "--gen-mesh-crate-stack",
"--gen-mesh-table", "--gen-mesh-lamppost", "--gen-mesh-bed",
"--gen-mesh-ladder", "--gen-mesh-well", "--gen-mesh-signpost",
"--gen-mesh-mailbox", "--gen-mesh-tombstone", "--gen-mesh-crate",