mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-22 03:51:23 +01:00
feat: routes - change data format
This commit is contained in:
parent
597f6ddd75
commit
b47fa6b92d
14 changed files with 155 additions and 139 deletions
|
|
@ -282,7 +282,7 @@ function editHeightmap(options) {
|
|||
const l = grid.cells.i.length;
|
||||
const biome = new Uint8Array(l);
|
||||
const pop = new Uint16Array(l);
|
||||
const route = new Uint8Array(l);
|
||||
const routes = {};
|
||||
const s = new Uint16Array(l);
|
||||
const burg = new Uint16Array(l);
|
||||
const state = new Uint16Array(l);
|
||||
|
|
@ -300,7 +300,7 @@ function editHeightmap(options) {
|
|||
biome[g] = pack.cells.biome[i];
|
||||
culture[g] = pack.cells.culture[i];
|
||||
pop[g] = pack.cells.pop[i];
|
||||
route[g] = pack.cells.route[i];
|
||||
routes[g] = pack.cells.routes[i];
|
||||
s[g] = pack.cells.s[i];
|
||||
state[g] = pack.cells.state[i];
|
||||
province[g] = pack.cells.province[i];
|
||||
|
|
@ -352,7 +352,7 @@ function editHeightmap(options) {
|
|||
// assign saved pack data from grid back to pack
|
||||
const n = pack.cells.i.length;
|
||||
pack.cells.pop = new Float32Array(n);
|
||||
pack.cells.route = new Uint8Array(n);
|
||||
pack.cells.routes = {};
|
||||
pack.cells.s = new Uint16Array(n);
|
||||
pack.cells.burg = new Uint16Array(n);
|
||||
pack.cells.state = new Uint16Array(n);
|
||||
|
|
@ -387,7 +387,7 @@ function editHeightmap(options) {
|
|||
if (!isLand) continue;
|
||||
pack.cells.culture[i] = culture[g];
|
||||
pack.cells.pop[i] = pop[g];
|
||||
pack.cells.route[i] = route[g];
|
||||
pack.cells.routes[i] = routes[g];
|
||||
pack.cells.s[i] = s[g];
|
||||
pack.cells.state[i] = state[g];
|
||||
pack.cells.province[i] = province[g];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue