mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 09:41:24 +01:00
river generator - subs confluence to select main stem
This commit is contained in:
parent
5c0b92c542
commit
77f371e28f
2 changed files with 25 additions and 12 deletions
|
|
@ -616,7 +616,7 @@ function addRiverOnClick() {
|
|||
|
||||
const river = rivers.find(r => r.i === riverId);
|
||||
const sourceWidth = 0.1;
|
||||
const widthFactor = river?.widthFactor || rn(0.8 + Math.random() * 0.4, 1);
|
||||
const widthFactor = river?.widthFactor || (parent ? 1 : 1.4);
|
||||
|
||||
const riverMeandered = Rivers.addMeandering(riverCells, sourceWidth * 10, 0.5);
|
||||
const [path, length, offset] = Rivers.getPath(riverMeandered, widthFactor, sourceWidth);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue