UNPKG

@expofp/floorplan

Version:

Interactive floor plan library for expos and events

34 lines • 1.59 kB
import { type SceneDef } from '@expofp/renderer'; import { type Route, type RouteEndpoint } from '@expofp/wayfinding'; import type RootStore from '../store/RootStore'; /** Whether `createWayfinding` has run and not yet been disposed. */ export declare function isWayfindingReady(): boolean; /** * Build a route between two endpoints. Throws if wayfinding is not initialized. * * TODO: compromise for the public SDK (`RouteStore.checkRoutes` diagnostic). Ad-hoc * route building should not be a public capability — routing belongs to the runtime. * Remove once the SDK surface no longer needs standalone route checks. */ export declare function buildRoute(from: RouteEndpoint, to: RouteEndpoint, options?: { accessible?: boolean; }): Route; /** What {@link createWayfinding} needs: a scene to draw into, and the stores to observe. */ export interface WayfindingOptions { /** The scene wayfinding fills; its root layers hold the block `configAll` mounted. */ readonly scene: SceneDef; /** The app store. */ readonly store: RootStore; /** A ref holding canvas that's rendering floorplan */ readonly canvas: { readonly current: HTMLCanvasElement | null; }; } /** * Starts wayfinding on a `@expofp/renderer` scene: builds the engine and runtime, binds them to * the stores, and declares the layout and pointer rules the renderer dispatches. * @param options - The scene and the store. * @returns A disposer. */ export declare function createWayfinding(options: WayfindingOptions): () => void; //# sourceMappingURL=createWayfinding.d.ts.map