import { RenderManagerBase } from '../RenderManagerBase'; import { ColorRepresentation, Plane, Vector3 } from 'three'; import { LabelAlignment } from './LabelTools'; import { LabelMapBase } from './LabelMapBase'; declare class DomLabelBase { /** * Label position in 3D space. */ position: Vector3; /** * Label position in screen space. */ screenPosition: Vector3; /** * DOM container for rendering label content. */ container: HTMLElement | undefined; containerIdx: number | undefined; /** * Is label clipped by clipping planes or not. */ isClipped: boolean; isInBounds: boolean; width: number; height: number; constructor(); reset(): void; checkWithClippingPlanes(planes: Plane[]): void; } /** * Single label with DOM rendering support. */ export declare class DomLabel extends DomLabelBase { /** * Is label collapsed with nearest labels into one or not. */ isCollapsed: boolean; /** * Label content. */ value: any; /** * Optional element number associated with label. */ elNum: number | undefined; color: string; lastElementVisible: boolean; /** * @param position - Label position. * @param value - Label content. * @param color - Label color. * @param elNum - Optional element number associated with label. */ constructor(position: Vector3, value: any, color: ColorRepresentation, elNum: number | undefined); } /** * Labels map options for creation. */ export declare class DomLabelMapOptions { /** * Name of the labels map. */ name: string; /** * Content render callback function. */ render: (container: HTMLElement, value: any, color: string, elNum: (number | undefined)) => void; /** * Content updater callback function. */ updater?: ((container: HTMLElement, value: any, color: string, elNum: (number | undefined)) => void) | undefined; /** * Alignment for label container. */ horizontalAlignment?: LabelAlignment; /** * Alignment for label container. */ verticalAlignment?: LabelAlignment; /** * Max visible labels on the screen. */ maxVisibleLabelsCount?: number; /** * Max visible label points on the screen when maxVisibleLabelsCount is not Infinity. */ maxLabelPointsCount?: number; } /** * Labels map with DOM rendering support. */ export declare class DomLabelMap extends LabelMapBase { /** * Labels map. */ labels: Map; labelContainers: Array; labelContainersIdx: Array; activeLabels: Set; private labelsArray; private readonly render; private readonly updater; labelsContainer: HTMLDivElement; private renderManager; private boundsTree; horizontalAlignment: LabelAlignment; verticalAlignment: LabelAlignment; private readonly labelScreenPoints; private readonly maxVisibleLabelsCount; private readonly maxLabelPointsCount; private needBuildLabelPoints; private shapecastCounter; /** * @param renderManager - RenderManager instance. * @param options - Labels map options for creation. */ constructor(renderManager: RenderManagerBase, options: DomLabelMapOptions); generateBoundsTree(): void; processLabels(forceShapecast?: boolean): void; /** * Clear labels. */ clear(): void; /** * Dispose label map. */ dispose(): void; /** * Update single label content. * @param name - Label name. * @param value - label content. */ update(name: string, value: any): void; /** * Update single label to labels map. * @param name - Label name. * @param position - Label position in 3D space. * @param value - label content. * @param color - label color. * @param elNum - Optional element number associated with label. */ add(name: string, position: Vector3, value: any, color?: ColorRepresentation, elNum?: number | undefined): void; checkWithClippingPlanes(planes: Plane[]): void; calculateScreenPosition(label: DomLabel): void; setScreenLabel(label: DomLabel): void; checkElementState(label: DomLabel): boolean; } export {};