mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 01:41:22 +01:00
normalize prec, flux and river width
This commit is contained in:
parent
f08b77bd6a
commit
604dcfacf6
6 changed files with 76 additions and 16 deletions
5
main.js
5
main.js
|
|
@ -979,7 +979,10 @@ function generatePrecipitation() {
|
|||
prec.selectAll("*").remove();
|
||||
const {cells, cellsX, cellsY} = grid;
|
||||
cells.prec = new Uint8Array(cells.i.length); // precipitation array
|
||||
const modifier = precInput.value / 100; // user's input
|
||||
|
||||
const cellsNumberModifier = (pointsInput.dataset.cells / 10000) ** 0.25;
|
||||
const precInputModifier = precInput.value / 100;
|
||||
const modifier = cellsNumberModifier * precInputModifier;
|
||||
|
||||
const westerly = [];
|
||||
const easterly = [];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue