Create a portal-aware distance map for the given start positions, using a breadth-first search.
This does not factor in terrain costs (treating anything less than 255 in the cost
matrix as passable), so it's faster but less useful than Dijkstra's algorithm.
Portals configured with initialize({ portals }) or setPortals are treated
like exits: stepping onto a portal entrance lands on its paired exit.
This calculates a distance map across multiple rooms, with a few configurable limits:
maxOps: The maximum number of pathfinding operations to perform.
maxRooms: The maximum number of rooms to explore.
maxPathCost: Don't explore tiles with a greater path cost than this.
At least one of these limits or destination lists must be set.
Create a portal-aware distance map for the given start positions, using a breadth-first search. This does not factor in terrain costs (treating anything less than 255 in the cost matrix as passable), so it's faster but less useful than Dijkstra's algorithm.
Portals configured with
initialize({ portals })orsetPortalsare treated like exits: stepping onto a portal entrance lands on its paired exit.This calculates a distance map across multiple rooms, with a few configurable limits:
maxOps: The maximum number of pathfinding operations to perform.maxRooms: The maximum number of rooms to explore.maxPathCost: Don't explore tiles with a greater path cost than this.At least one of these limits or destination lists must be set.