normalize prec, flux and river width

This commit is contained in:
Azgaar 2021-12-30 18:49:36 +03:00
parent f08b77bd6a
commit 604dcfacf6
6 changed files with 76 additions and 16 deletions

View file

@ -624,7 +624,9 @@ function addRiverOnClick() {
const source = riverCells[0];
const mouth = riverCells[riverCells.length - 2];
const widthFactor = river?.widthFactor || (!parent || parent === riverId ? 1.2 : 1);
const defaultWidthFactor = rn(1 / (pointsInput.dataset.cells / 10000) ** 0.25, 2);
const widthFactor = river?.widthFactor || (!parent || parent === riverId ? defaultWidthFactor * 1.2 : defaultWidthFactor);
const meanderedPoints = addMeandering(riverCells);
const discharge = cells.fl[mouth]; // m3 in second