mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-22 12:01:23 +01:00
Change connected to be dictionary instead of array. No functional changes but should be slightly better performant.
This commit is contained in:
parent
bfe3e6a82f
commit
066fbd4913
1 changed files with 1 additions and 1 deletions
|
|
@ -68,7 +68,7 @@ window.Routes = (function () {
|
||||||
|
|
||||||
const bodies = new Set(allPorts.map(b => b.port)); // water features with ports
|
const bodies = new Set(allPorts.map(b => b.port)); // water features with ports
|
||||||
let paths = []; // array to store path segments
|
let paths = []; // array to store path segments
|
||||||
const connected = []; // store cell id of connected burgs
|
const connected = {}; // store cell id of connected burgs
|
||||||
|
|
||||||
bodies.forEach(f => {
|
bodies.forEach(f => {
|
||||||
const ports = allPorts.filter(b => b.port === f); // all ports on the same feature
|
const ports = allPorts.filter(b => b.port === f); // all ports on the same feature
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue