refactor: ckeanup

This commit is contained in:
max 2022-07-24 18:06:55 +03:00
parent fe4d4eac86
commit bb78d5168b
6 changed files with 23 additions and 93 deletions

View file

@ -9,7 +9,7 @@ import {byId} from "utils/shorthands";
import {ERROR} from "../config/logging";
import {lim, minmax} from "../utils/numberUtils";
import {aleaPRNG} from "scripts/aleaPRNG";
import {openNearSeaLakes, addLakesInDeepDepressions} from "scripts/generation/grid/lakes";
import {addLakesInDeepDepressions} from "scripts/generation/grid/lakes";
window.HeightmapGenerator = (function () {
let grid = null;
@ -78,14 +78,7 @@ window.HeightmapGenerator = (function () {
Math.random = aleaPRNG(seed);
const rawHeights = id in heightmapTemplates ? fromTemplate(graph, id) : await fromPrecreated(graph, id);
const removedLakesHeights = openNearSeaLakes(rawHeights, graph.cells.c, graph.cells.i, graph.cells.b);
const addedLakesHeights = addLakesInDeepDepressions(
removedLakesHeights,
graph.cells.c,
graph.cells.v,
graph.vertices,
graph.cells.i
);
const addedLakesHeights = addLakesInDeepDepressions(rawHeights, graph.cells.c, graph.cells.i);
TIME && console.timeEnd("defineHeightmap");

View file

@ -6,7 +6,7 @@ import {getMiddlePoint} from "utils/lineUtils";
import {rn} from "utils/numberUtils";
import {aleaPRNG} from "scripts/aleaPRNG";
import {renderLayer} from "layers";
import {markupGridFeatures} from "modules/markup";
import {markupGridFeatures} from "scripts/generation/markup";
import {generateGrid} from "scripts/generation/graph";
window.Submap = (function () {