mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2026-03-23 07:37:24 +01:00
refactor: Update RELIEF_SYMBOLS structure and utilize RELIEF_ATLASES for terrainLayer
This commit is contained in:
parent
c7793d2578
commit
b17b417d1b
3 changed files with 35 additions and 36 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue