mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-19 10:31:24 +01:00
fefactor: edit coastline and lake
This commit is contained in:
parent
0f86a08012
commit
2744d32ca0
5 changed files with 164 additions and 168 deletions
|
|
@ -82,7 +82,7 @@ window.Features = (function () {
|
|||
TIME && console.time("markupPack");
|
||||
|
||||
const {cells, vertices} = pack;
|
||||
const {h: heights, c: neighbors, b: borderCells, i} = cells;
|
||||
const {c: neighbors, b: borderCells, i} = cells;
|
||||
const packCellsNumber = i.length;
|
||||
if (!packCellsNumber) return; // no cells -> there is nothing to do
|
||||
|
||||
|
|
@ -191,7 +191,7 @@ window.Features = (function () {
|
|||
const startingVertex = cells.v[firstCell].find(v => vertices.c[v].some(ofDifferentType));
|
||||
if (startingVertex === undefined) throw new Error(`Markup: startingVertex for cell ${firstCell} is not found`);
|
||||
|
||||
return connectVertices({vertices, startingVertex, ofSameType, closeRing: true});
|
||||
return connectVertices({vertices, startingVertex, ofSameType, closeRing: false});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue