refactor: Update RELIEF_SYMBOLS structure and utilize RELIEF_ATLASES for terrainLayer

This commit is contained in:
Azgaar 2026-03-12 20:39:17 +01:00
parent c7793d2578
commit b17b417d1b
3 changed files with 35 additions and 36 deletions

View file

@ -57,10 +57,8 @@ fs.mkdirSync(OUTPUT_DIR, {recursive: true});
const browser = await chromium.launch();
const page = await browser.newPage();
for (const [set, ids] of Object.entries(RELIEF_SYMBOLS)) {
for (const [set, {ids, cols, rows}] of Object.entries(RELIEF_SYMBOLS)) {
const n = ids.length;
const cols = Math.ceil(Math.sqrt(n));
const rows = Math.ceil(n / cols);
const W = cols * SPRITE_SIZE;
const H = rows * SPRITE_SIZE;