Sprite-mode bake gains an additive --pixels-per-meter flag. When set, the value is written into sprites.uv.json under atlas_meta. pixels_per_meter. Consumers (lib-core.render path-1 via per-entity sprite_scale) divide their project canonical px/m by this number to auto-scale the rendered quad — atlas-native resolution no longer needs to match the project tile-scale. Unset (legacy bakes): atlas_meta omitted, byte-equal to v0.3.0 output. Tests: 53/53 pass; existing buildUvJson test continues to assert the unset-default shape. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
19 lines
880 B
JSON
19 lines
880 B
JSON
{
|
|
"name": "sporel-tool-atlas-baker",
|
|
"version": "0.4.0",
|
|
"description": "Bake paired diffuse + height PNG atlases for the Sporel map-lib v0.3.0+ format. v0.2: edge-replicated padding (Rev 4 §13.3), --schema blob-14 E1 slot validation, collision.json sidecar E2 validation + pass-through, alpha-analysis opaque flag. Accepts PNG/WebP/JPG via jimp; v0.3 adds --mode sprite for diffuse-only atlases of irregularly-sized sprites with alias→UV-table sidecar; v0.4 adds --pixels-per-meter <N> to sprite-mode, embedded as atlas_meta.pixels_per_meter in sprites.uv.json (consumed by render-side scale-resolution per project canonical px/m).",
|
|
"bin": {
|
|
"sporel-atlas-baker": "bin/atlas-baker.js"
|
|
},
|
|
"scripts": {
|
|
"test": "node --test tests/*.test.js"
|
|
},
|
|
"dependencies": {
|
|
"jimp": "^0.22.10",
|
|
"pngjs": "^7.0.0"
|
|
},
|
|
"engines": {
|
|
"node": ">=18"
|
|
}
|
|
}
|