import { Texture, Camera, Color, Object3D, Vector2 } from 'three'; import { Overlay3D } from './Overlay3D'; import { DefaultOverlay3DContentType, OverlayCollection, OverlayInfo } from './OverlayCollection'; /** * Constructor options for the Overlay3DCollection */ export type Overlay3DCollectionOptions = { /** * The texture to display as icons in this collection */ overlayTexture?: Texture; /** * A texture mask for marking what pixels are transparent in the supplied overlayTexture */ overlayTextureMask?: Texture; /** * The maximum display size of each icon in pixels */ maxPointSize?: number; /** * The minimum display size of each icon in pixels */ minPointSize?: number; /** * The default color to apply to overlay icons without a color on their own */ defaultOverlayColor?: Color; }; /** * A collection of overlay icons with associated data */ export declare class Overlay3DCollection extends Object3D implements OverlayCollection { private readonly MinPixelSize; private readonly MaxPixelSize; private readonly DefaultMaxPoints; private readonly defaultOverlayColor; private readonly _sharedTextures; private readonly _overlayPoints; private readonly _iconRadius; private _overlays; private _octree; private readonly _rayCaster; private readonly _cameraChangeDebouncer; /** * Construct a collection of 3D overlay icons * * @param overlayInfos Initializes the collection with the list of overlays. The length * of the list will be the maximum allowed number of icons in this collection, unless it's empty, * in which case a default maximum limit will be used instead * @param options Additional options for this overlay collection */ constructor(overlayInfos: OverlayInfo[], options?: Overlay3DCollectionOptions); /** * Set whether this collection is visible or not */ setVisibility(visibility: boolean): void; /** * Get the overlay icons contained in this collection */ getOverlays(): Overlay3D[]; /** * Add more overlays into this collection */ addOverlays(overlayInfos: OverlayInfo[]): Overlay3D[]; private readonly onBeforeRenderDelegate; private sortOverlaysRelativeToCamera; /** * Remove the listed overlays from this collection */ removeOverlays(overlays: Overlay3D[]): void; /** * Clean up all icons in this collection */ removeAllOverlays(): void; /** * Run intersection on icons in this collection. Returns the closest hit */ intersectOverlays(normalizedCoordinates: Vector2, camera: Camera): Overlay3D | undefined; private rebuildOctree; private updatePointsObject; private initializeOverlay3DIcons; private updatePointScale; /** * Dispose this collection and icons with all associated resources */ dispose(): void; private createCircleTextures; }