@expofp/floorplan
Version:
Interactive floor plan library for expos and events
29 lines • 1.36 kB
TypeScript
import { type RouteEndpoint, type RouteLine, type RouteSnapResult } from "../core";
interface RouteRenderData {
/** Route lines behind the current user position (empty when no snap). */
readonly passed: RouteLine[];
/** Route lines ahead of the current user position (the full normalized route when no snap). */
readonly remaining: RouteLine[];
/** Remaining route distance along the polyline. */
readonly distance: number;
}
/**
* Pure pipeline that produces the data needed to render the route: the
* passed/remaining split for the visible floor plus the remaining
* distance to the destination.
*
* The full non-virtual route is normalized to from→to direction once and
* sliced down to the visible floor for rendering. The remaining distance
* is read from `snap.distance` (computed once inside `snapToRoute`); when
* no snap is active we fall back to the full route length.
*/
export declare function computeRouteRenderData({ routeLines, currentRouteLayer, from, to, snap, }: {
readonly routeLines: RouteLine[];
/** null = show-all mode; otherwise the active route floor. */
readonly currentRouteLayer: string | null;
readonly from: RouteEndpoint;
readonly to: RouteEndpoint;
readonly snap: RouteSnapResult | null;
}): RouteRenderData;
export {};
//# sourceMappingURL=routeRenderData.d.ts.map