mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-19 02:21:24 +01:00
refactor: ckeanup
This commit is contained in:
parent
fe4d4eac86
commit
bb78d5168b
6 changed files with 23 additions and 93 deletions
|
|
@ -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");
|
||||
|
||||
|
|
|
|||
|
|
@ -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 () {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue