tweak
This commit is contained in:
parent
47af930e18
commit
e1bb10ff8a
12 changed files with 1336 additions and 526 deletions
28
fields.js
Normal file
28
fields.js
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
import { SIZE } from "./grid.js";
|
||||
|
||||
export function createMapFields() {
|
||||
const flowTo = new Int32Array(SIZE);
|
||||
flowTo.fill(-1);
|
||||
|
||||
return {
|
||||
elevation: new Float32Array(SIZE),
|
||||
moisture: new Float32Array(SIZE),
|
||||
slope: new Float32Array(SIZE),
|
||||
sea: new Uint8Array(SIZE),
|
||||
river: new Float32Array(SIZE),
|
||||
floodplain: new Float32Array(SIZE),
|
||||
plain: new Float32Array(SIZE),
|
||||
agriculture: new Float32Array(SIZE),
|
||||
ridgeField: new Float32Array(SIZE),
|
||||
valleyField: new Float32Array(SIZE),
|
||||
basinField: new Float32Array(SIZE),
|
||||
coastalLowland: new Float32Array(SIZE),
|
||||
flowAccum: new Float32Array(SIZE),
|
||||
erosionField: new Float32Array(SIZE),
|
||||
depositionField: new Float32Array(SIZE),
|
||||
flowTo,
|
||||
portSuitability: new Float32Array(SIZE),
|
||||
crossingSuitability: new Float32Array(SIZE),
|
||||
passSuitability: new Float32Array(SIZE),
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue