Skip to content

spatial-monorepo


spatial-monorepo / wayfinding/src / nearestEntranceNode

Function: nearestEntranceNode()

nearestEntranceNode(pt, graph, levelId?): WayfindingNode | undefined

Defined in: packages/wayfinding/src/graph.ts:592

Nearest graph node with category === 'entrance'. Returns undefined when the graph has no matching entrance nodes.

levelId, when provided, restricts the search to nodes on that floor — see nearestWalkableNode for why this matters (issue #584).

Parameters

pt

Position2D

graph

WayfindingGraph

levelId?

string

Returns

WayfindingNode | undefined

Released under commercial licensing.