# sporel-tool-atlas-baker Builds paired diffuse + height PNG atlases for the Sporel map-lib v0.3.0+ format. **v0.2.0** adds edge-replicated padding (Rev 4 §13.3), `--schema blob-14` slot validation (E1), a `collision.json` sidecar (E2 validation + pass-through), and alpha-analysis that sets a per-tile `tile.opaque` flag. Source tiles may be PNG, WebP, or JPG (decoded via jimp). ## Usage ```bash sporel-atlas-baker \ --in \ --out \ --atlas-id \ [--tile-size 64 | auto] \ [--max-size 4096] \ [--pad-px ] \ [--schema blob-14] \ [--lock ] \ [--blocks-sight-pattern ] \ [--verbose] ``` ### Flags | Flag | Meaning | | --- | --- | | `--in ` | Directory of source tile images. | | `--out ` | Output directory for the baked atlas + sidecars. | | `--atlas-id ` | Stable atlas identifier written into the lock. | | `--tile-size ` | Tile edge length in pixels, or `auto` to infer it from the source tiles. | | `--max-size ` | Maximum atlas dimension in pixels (default 4096). | | `--pad-px ` | Edge-replicated padding (gutter) applied around each tile, in pixels (Rev 4 §13.3). | | `--schema ` | Slot-validation schema for the source set. `blob-14` is the v0.2 14-slot blob schema (E1); required by lib-core.maps v0.5.1. | | `--lock ` | Reuse an existing lock to keep tile indices stable. | | `--blocks-sight-pattern ` | Regex matching tile names that block line of sight. | | `--verbose` | Print detailed per-tile diagnostics. | See `sporel-meta/docs/superpowers/specs/2026-05-21-map-multi-layer-design.md` §4 for the format spec. ## Development ```bash npm install npm test ```