feat(editor): add --gen-texture-herringbone chevron pattern

32nd procedural texture: classic V-shaped herringbone done as
horizontal strips of parallel slanted lines whose slant
direction flips every strip. Implementation is a per-pixel
shear: shifting x by the row's local-y collapses each diagonal
into a vertical band in shifted-x space, so a single modulo
picks line vs background.

Useful for parquet floors, brick patios, fabric weaves, fish
scale-style chain mail, anywhere needing a strong directional
pattern. Two-color, defaults to 32-px strips with 12-px line
spacing and 4-px line width.
This commit is contained in:
Kelsi 2026-05-09 06:49:29 -07:00
parent 9362623297
commit c1f3d5aba4
3 changed files with 93 additions and 1 deletions

View file

@ -97,6 +97,8 @@ void printUsage(const char* argv0) {
std::printf(" Tartan plaid: 3-color crossing bands forming Scottish-style overlap pattern\n");
std::printf(" --gen-texture-argyle <out.png> <colorAHex> <colorBHex> <stitchHex> [cellPx] [W H]\n");
std::printf(" Argyle: 45-rotated lozenge checkerboard with diagonal stitch lines (sweater knit)\n");
std::printf(" --gen-texture-herringbone <out.png> <bgHex> <lineHex> [stripH] [lineSpacing] [lineWidth] [W H]\n");
std::printf(" Herringbone: slanted parallel lines that flip direction every strip (chevron / fish-bone)\n");
std::printf(" --add-texture-to-zone <zoneDir> <png-path> [renameTo]\n");
std::printf(" Copy an existing PNG into <zoneDir> (optionally renaming it on the way in)\n");
std::printf(" --gen-mesh <wom-base> <cube|plane|sphere|cylinder|torus|cone|ramp> [size]\n");