Bake stub atlas-sets for demo_tilemap and walls_tilemap

Replaces the legacy color-only *.tilemap.json fixtures with baked
2-tile atlas-sets in the new atlases/<id>/{diffuse,height,atlas-json,
lock-json} layout. Stub PNGs are 32x32 solid colors matching the
previous color values; height channel is synthesized L8=0 by the baker.
A scripts/bake.sh re-bake helper drives the atlas-baker tool against
assets/_sources/.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Axel Meyer
2026-05-21 22:53:30 +02:00
parent c3e9eda702
commit 394e8faef2
16 changed files with 122 additions and 16 deletions

21
assets/_sources/_gen.js Normal file
View File

@@ -0,0 +1,21 @@
const { PNG } = require('pngjs');
const fs = require('node:fs');
const path = require('node:path');
function writeSolidRGBA(p, w, h, rgba) {
const png = new PNG({ width: w, height: h });
for (let i = 0; i < png.data.length; i += 4) {
png.data[i + 0] = rgba[0];
png.data[i + 1] = rgba[1];
png.data[i + 2] = rgba[2];
png.data[i + 3] = rgba[3];
}
fs.writeFileSync(p, PNG.sync.write(png));
}
const SOURCES = path.resolve(__dirname);
writeSolidRGBA(path.join(SOURCES, 'demo_tilemap', 'grass_diffuse.png'), 32, 32, [110, 170, 80, 255]);
writeSolidRGBA(path.join(SOURCES, 'demo_tilemap', 'stone_diffuse.png'), 32, 32, [120, 120, 120, 255]);
writeSolidRGBA(path.join(SOURCES, 'walls_tilemap', 'wall_brick_diffuse.png'), 32, 32, [180, 100, 80, 255]);
writeSolidRGBA(path.join(SOURCES, 'walls_tilemap', 'wall_wood_diffuse.png'), 32, 32, [140, 90, 50, 255]);
console.log('test-stub sources generated');

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 B