refactor: migrate heightmap editor

This commit is contained in:
Azgaar 2022-07-09 14:16:57 +03:00
parent a97e7f44f6
commit a15f60150f
26 changed files with 103 additions and 80 deletions

View file

@ -1,9 +1,11 @@
import * as d3 from "d3";
import {INFO} from "config/logging";
import {findCell} from "utils/graphUtils";
import {getMiddlePoint} from "utils/lineUtils";
import {rn} from "utils/numberUtils";
import {aleaPRNG} from "scripts/aleaPRNG";
import {renderLayer} from "layers";
window.Submap = (function () {
const isWater = (pack, id) => pack.cells.h[id] < 20;
@ -210,7 +212,7 @@ window.Submap = (function () {
stage("Regenerating river network.");
Rivers.generate();
drawRivers();
renderLayer("rivers");
Lakes.defineGroup();
// biome calculation based on (resampled) grid.cells.temp and prec