refactor: rivers generation

This commit is contained in:
max 2022-07-21 00:23:37 +03:00
parent c1e7d6f54a
commit 3215b6f0d2
18 changed files with 739 additions and 704 deletions

View file

@ -14,6 +14,7 @@ interface Window {
// untyped IIFE modules
Biomes: any;
Rivers: any;
Names: any;
ThreeD: any;
ReliefIcons: any;
@ -21,7 +22,6 @@ interface Window {
Lakes: any;
HeightmapGenerator: any;
OceanLayers: any;
Rivers: any;
Cultures: any;
BurgsAndStates: any;
Religions: any;

View file

@ -30,7 +30,8 @@ interface IPackFeatureLake extends IPackFeatureBase {
flux?: number;
temp?: number;
evaporation?: number;
outCell?: number;
inlets?: number[];
outlet?: number;
}
type TPackFeature = IPackFeatureOcean | IPackFeatureIsland | IPackFeatureLake;

View file

@ -17,9 +17,9 @@ interface IPackCells {
g: UintArray;
s: IntArray;
pop: Float32Array;
fl: UintArray;
conf: UintArray;
r: UintArray;
fl: Uint16Array; // flux volume, defined by drainWater() in river-generator.ts
r: Uint16Array; // river id, defined by defineRivers() in river-generator.ts
conf: Uint16Array; // conluence, defined by defineRivers() in river-generator.ts
biome: UintArray;
area: UintArray;
state: UintArray;