UNPKG

@expofp/floorplan

Version:

Interactive floor plan library for expos and events

2 lines (1 loc) 274 B
import{buildGraph as i}from"./buildGraph";import{createAStarPathFinder as u}from"./pathfinder/aStarPathFinder";export function createGraphCache(){let r=null,t=!1;return{getOrBuild(a,e){if(r&&t===e)return r;const n=u();return r=i(a,n,{oriented:!0,onlyAccessible:e}),t=e,r}}}