mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 01:41:22 +01:00
river edit: allow to add interim points
This commit is contained in:
parent
c1533c5408
commit
008aea2b2f
3 changed files with 58 additions and 39 deletions
|
|
@ -319,9 +319,10 @@ window.Rivers = (function () {
|
|||
};
|
||||
|
||||
const getRiverPoints = (riverCells, riverPoints) => {
|
||||
if (riverPoints) return riverPoints;
|
||||
|
||||
const {p} = pack.cells;
|
||||
return riverCells.map((cell, i) => {
|
||||
if (riverPoints && riverPoints[i]) return riverPoints[i];
|
||||
if (cell === -1) return getBorderPoint(riverCells[i - 1]);
|
||||
return p[cell];
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue