composeAtlas blits placed tile pixels into bounds-sized RGBA + L8 PNGs,
synthesizing L8=0 planes for unpaired diffuse tiles. buildAtlasJson
emits the metadata with deterministic ID-sorted tile arrays and applies
the optional blocks_sight regex.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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>
Lock-file determinism guarantees re-bakes do not renumber existing
tiles. Atlas_id mismatch is a hard-fail to prevent silent corruption.
Deleted tile IDs move to deleted[] and are not recycled.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Creates the sporel-tool-atlas-baker Node CLI scaffold and the first
phase of the bake pipeline: scan a source directory for *_diffuse.png
files, pair them with optional *_height.png companions, and return
alphabetically-sorted sources for deterministic re-bakes.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>