spatial-monorepo / wayfinding/src / resolveFloorChain
Function: resolveFloorChain()
resolveFloorChain(
graph,originLevelId,destinationLevelId,floorHopCost?,buildingHopCost?):string[] |null
Defined in: packages/wayfinding/src/grid-multifloor.ts:222
Resolves the minimum-cost sequence of levelIds from originLevelId to destinationLevelId by walking graph.edges — cost per hop is floorHopCost within one building, buildingHopCost across a genuine building change (issue #482 AC2: building-hop cost is a large constant relative to floor-hop cost, so the chain prefers staying in-building). Returns null when the two floors are not connected at all.
Parameters
graph
originLevelId
string
destinationLevelId
string
floorHopCost?
number = DEFAULT_FLOOR_HOP_COST
buildingHopCost?
number = DEFAULT_BUILDING_HOP_COST
Returns
string[] | null
