Axel Meyer 52689e9a9c Add MaxRects Best-Area-Fit packer
Deterministic placement heuristic (Best-Area-Fit with tiebreak on
shorter remaining short side). Power-of-2-rounded output bounds for
GPU friendliness. Oversize hard-fails with packed-area diagnostic.

Test bounds corrected: guillotine split fills tiles left-to-right,
so 3x 32x32 tiles produce boundsW=128 (not 64 as the plan draft had).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 22:44:00 +02:00
2026-05-21 22:44:00 +02:00
2026-05-21 22:44:00 +02:00

sporel-tool-atlas-baker

Builds paired diffuse + height PNG atlases for the Sporel map-lib v0.3.0+ format.

Usage

sporel-atlas-baker \
  --in <source-dir> \
  --out <atlas-dir> \
  --atlas-id <stable-id> \
  [--tile-size 64] \
  [--max-size 4096] \
  [--lock <existing-lock.json>] \
  [--blocks-sight-pattern <regex>]

See sporel-meta/docs/superpowers/specs/2026-05-21-map-multi-layer-design.md §4 for the format spec.

Development

npm install
npm test
Description
Bake paired diffuse + height PNG atlases for the Sporel map-lib v0.3.0+ format.
Readme 110 KiB
Languages
JavaScript 100%