mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 17:51:24 +01:00
add river on click fix
This commit is contained in:
parent
4902a321ea
commit
d5b2e7ed14
2 changed files with 5 additions and 5 deletions
|
|
@ -613,7 +613,7 @@ function addRiverOnClick() {
|
|||
}
|
||||
|
||||
const river = rivers.find(r => r.i === riverId);
|
||||
const widthFactor = river?.widthFactor || (!parent || parent === r ? 1.2 : 1);
|
||||
const widthFactor = river?.widthFactor || (!parent || parent === riverId ? 1.2 : 1);
|
||||
|
||||
const riverMeandered = Rivers.addMeandering(riverCells, 1);
|
||||
lineGen.curve(d3.curveCatmullRom.alpha(0.1));
|
||||
|
|
@ -641,7 +641,7 @@ function addRiverOnClick() {
|
|||
const name = Rivers.getName(mouth);
|
||||
const type = Rivers.getType({i: riverId, length, parent});
|
||||
|
||||
rivers.push({i: riverId, source, mouth, discharge, length, width, widthFactor, sourceWidth, parent, cells: riverCells, basin, name, type});
|
||||
rivers.push({i: riverId, source, mouth, discharge, length, width, widthFactor, sourceWidth: 0, parent, cells: riverCells, basin, name, type});
|
||||
}
|
||||
|
||||
if (d3.event.shiftKey === false) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue