mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 01:41:22 +01:00
v1.0
This commit is contained in:
parent
5f9cab4f84
commit
cab429a346
58 changed files with 6413 additions and 1489 deletions
|
|
@ -148,6 +148,7 @@
|
|||
const regenerate = function() {
|
||||
routes.selectAll("path").remove();
|
||||
pack.cells.road = new Uint16Array(pack.cells.i.length);
|
||||
pack.cells.crossroad = new Uint16Array(pack.cells.i.length);
|
||||
const main = getRoads();
|
||||
const small = getTrails();
|
||||
const ocean = getSearoutes();
|
||||
|
|
@ -203,8 +204,8 @@
|
|||
if (segment.length) {
|
||||
segment.push(current);
|
||||
path.push(segment);
|
||||
if (segment[0] !== end) cells.road[segment[0]] += score; // crossroad
|
||||
if (current !== start) cells.road[current] += score; // crossroad
|
||||
if (segment[0] !== end) {cells.road[segment[0]] += score; cells.crossroad[segment[0]] += score;}
|
||||
if (current !== start) {cells.road[current] += score; cells.crossroad[current] += score;}
|
||||
}
|
||||
segment = [];
|
||||
prev = current;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue