@expofp/floorplan
Version:
Interactive floor plan library for expos and events
26 lines • 1.38 kB
TypeScript
import { type SceneDef } from '@expofp/renderer';
import { type FloorPlanMarkerEvent } from '../../../../types';
export declare const MARKER_LAYER_NAME = "markers";
/** What {@link configMarkers} needs: the scene whose root layers hold the marker layer. */
export interface MarkerOptions {
/** The scene markers are drawn into; `config-all` pre-creates their layer in it. */
readonly scene: SceneDef;
}
/**
* Draws the plan's markers into a renderer scene and keeps them current with the store.
* @param options - The scene to draw into.
* @returns A disposer.
*/
export declare function configMarkers(options: MarkerOptions): () => void;
/**
* The marker a click on the plan landed on, at the size markers are currently drawn.
*
* The pixel size comes from the marker layer's own handler rather than from a renderer the plan holds
* a reference to — which is the whole of what this adds over {@link getMarkerFromClick}.
* @param x - Where the click landed, in plan units.
* @param y - Where the click landed, in plan units.
* @returns The marker, or `null` when the click reached none.
*/
export declare function markerAt(x: number, y: number): FloorPlanMarkerEvent | null;
export declare function getMarkerFromClick(x: number, y: number, scale: number): import("../../../../store/RouteStore").Marker | null;
//# sourceMappingURL=config-markers.d.ts.map