import { Object3D, Plane, Box3, Color, Vector2, Vector3 } from 'three'; import { PointerEventDelegate, SceneRenderedDelegate, DisposedDelegate, BeforeSceneRenderedDelegate, ICustomObject, CustomObjectIntersectInput } from '../../../../utilities'; import { CogniteCadModel } from '../../../../cad-model'; import { PointCloudBudget, CognitePointCloudModel } from '../../../../pointclouds'; import { AddImage360Options, Cognite3DViewerOptions, Intersection, CadModelBudget, ResolutionOptions, RenderParameters, AnyIntersection, AddModelOptions } from './types'; import { CogniteModel, Image360WithCollection } from '../types'; import { ViewerState } from '../../utilities/ViewStateHelper'; import { CameraManager, CameraChangeDelegate, CameraStopDelegate } from '../../../../camera-manager'; import { Image360DataModelIdentifier, ClassicDataSourceType, DataSourceType } from '../../../../data-providers'; import { SupportedModelTypes } from '../../../../model-base'; import { Image360Collection, Image360, Image360Revision, Image360AnnotationIntersection } from '../../../../360-images'; import { Image360Action } from '../../../../360-images/src/Image360Action'; /** * @example * ```js * const viewer = new Cognite3DViewer({ * noBackground: true, * sdk: CogniteClient({...}) * }); * ``` * @module @cognite/reveal */ export declare class Cognite3DViewer { private readonly _domElementResizeObserver; private readonly _image360ApiHelper; private readonly _unsubsribeOnLoading; private _onContextLost; private _onContextRestored; /** * Returns the rendering canvas, the DOM element where the renderer draws its output. */ get canvas(): HTMLCanvasElement; /** * The DOM element the viewer will insert its rendering canvas into. * The DOM element can be specified in the options when the viewer is created. * If not specified, the DOM element will be created automatically. * The DOM element cannot be changed after the viewer has been created. */ get domElement(): HTMLElement; /** * Returns parameters of WebGLRenderer used by the viewer. */ get renderParameters(): RenderParameters; /** * Returns the renderer used to produce images from 3D geometry. */ private get renderer(); private readonly _cdfSdkClient; private readonly _dataSource; private readonly _sceneHandler; private readonly _activeCameraManager; private readonly _revealManagerHelper; private readonly _domElement; private readonly _renderer; private readonly _ownsRenderer; private readonly _pickingHandler; private readonly _pointCloudPickingHandler; private readonly _boundAnimate; private readonly _events; private readonly _mouseHandler; private readonly _models; private isDisposed; private latestRequestId; private readonly sessionLogger; private readonly cameraManagerClock; private _clippingNeedsUpdate; private _forceStopRendering; private readonly spinner; /** * Enable us to ensure models are added in the order their load is initialized. */ private readonly _addModelSequencer; private get revealManager(); /** * Reusable buffers used by functions in Cognite3dViewer to avoid allocations. */ private readonly _boundingBoxes; /** * Gets the current budget for downloading geometry for CAD models. Note that this * budget is shared between all added CAD models and not a per-model budget. */ get cadBudget(): CadModelBudget; /** * Sets the current budget for downloading geometry for CAD models. Note that this * budget is shared between all added CAD models and not a per-model budget. */ set cadBudget(budget: CadModelBudget); /** * Gets whether CAD shadows are currently enabled. * @beta */ get shadowsEnabled(): boolean; /** * Enables or disables CAD shadows at runtime, along with the world-space sun shading * that matches them. Turning shadows on changes the CAD look even where no shadow is * cast, including ghosted nodes. The GPU resources are allocated the first time shadows * are enabled. * @beta */ set shadowsEnabled(enabled: boolean); /** * Returns the point cloud budget. The budget is shared between all loaded * point cloud models. */ get pointCloudBudget(): PointCloudBudget; /** * Sets the point cloud budget. The budget is shared between all loaded * point cloud models. */ set pointCloudBudget(budget: PointCloudBudget); /** * Gets a list of models currently added to the viewer. */ get models(): CogniteModel[]; constructor(options: Cognite3DViewerOptions); /** * Listens for render context loss/restore. On loss, prevents the default (so the * browser attempts recovery) and sets `isRenderContextLost()`; on restore, clears * the flag and requests a redraw. */ private registerContextLossHandlers; /** * Get resolution options that are set on the viewer. This includes * settings for max resolution and limiting resolution when moving the camera. * @returns Options Options that are applied. */ getResolutionOptions(): ResolutionOptions; /** * Set options to control resolution of the viewer. This includes * settings for max resolution and limiting resolution when moving the camera. * @param options Options to apply. */ setResolutionOptions(options: ResolutionOptions): void; /** * Returns reveal version installed. */ getVersion(): string; /** * Sets the log level. Used for debugging. * Defaults to 'none' (which is identical to 'silent'). * @param level */ setLogLevel(level: 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'silent' | 'none'): void; /** * Dispose of WebGL resources. Can be used to free up memory when the viewer is no longer in use. * @see {@link https://threejs.org/docs/#manual/en/introduction/How-to-dispose-of-objects} * ```js * // Viewer is no longer in use, free up memory * viewer.dispose(); * ``` */ dispose(): void; /** * Triggered when the viewer is disposed. Listeners should clean up any * resources held and remove the reference to the viewer. */ on(event: 'disposed', callback: DisposedDelegate): void; /** * @example * ```js * const onClick = (event) => { console.log(event.offsetX, event.offsetY) }; * viewer.on('click', onClick); * ``` */ on(event: 'click' | 'hover', callback: PointerEventDelegate): void; /** * @example * ```js * viewer.on('cameraChange', (position, target) => { * console.log('Camera changed: ', position, target); * }); * ``` */ on(event: 'cameraChange', callback: CameraChangeDelegate): void; /** * @example * ```js * viewer.on('cameraStop', () => { * console.log('Camera stopped'); * }); * ``` */ on(event: 'cameraStop', callback: CameraStopDelegate): void; /** * Event that is triggered immediately before the scene is rendered. * @param event Metadata about the rendering frame. * @param callback Callback to trigger when event occurs. */ on(event: 'beforeSceneRendered', callback: BeforeSceneRenderedDelegate): void; /** * Event that is triggered immediately after the scene has been rendered. * @param event Metadata about the rendering frame. * @param callback Callback to trigger when the event occurs. */ on(event: 'sceneRendered', callback: SceneRenderedDelegate): void; /** * @example * ```js * viewer.off('click', onClick); * ``` */ off(event: 'click' | 'hover', callback: PointerEventDelegate): void; /** * @example * ```js * viewer.off('cameraChange', onCameraChange); * ``` */ off(event: 'cameraChange', callback: CameraChangeDelegate): void; /** * @example * ```js * viewer.off('cameraStop', onCameraStop); * ``` */ off(event: 'cameraStop', callback: CameraStopDelegate): void; /** * Unsubscribe the 'beforeSceneRendered'-event previously subscribed with {@link Cognite3DViewer.on}. */ off(event: 'beforeSceneRendered', callback: BeforeSceneRenderedDelegate): void; /** * @example * ```js * viewer.off('sceneRendered', updateStats); * ``` */ off(event: 'sceneRendered', callback: SceneRenderedDelegate): void; /** * @example * ```js * viewer.off('disposed', clearAll); * ``` */ off(event: 'disposed', callback: DisposedDelegate): void; get cameraManager(): CameraManager; /** * Sets the active camera manager instance for current Cognite3Dviewer. * @param cameraManager Camera manager instance. */ setCameraManager(cameraManager: CameraManager): void; /** * Gets the current viewer state which includes the camera pose as well as applied styling. * @returns JSON object containing viewer state. */ getViewState(): ViewerState; /** * Restores camera settings from the state provided, and clears all current styled * node collections and applies the `state` object. * @param state Viewer state retrieved from {@link Cognite3DViewer.getViewState}. */ setViewState(state: ViewerState): Promise; /** * Add a new model to the viewer. * Call {@link Cognite3DViewer.fitCameraToModel} to see the model after the model has loaded. * @param options * @example * ```js * const options = { * modelId: 'COGNITE_3D_MODEL_ID', * revisionId: 'COGNITE_3D_REVISION_ID', * }; * viewer.addModel(options).then(model => { * viewer.fitCameraToModel(model, 0); * }); * ``` */ addModel(options: AddModelOptions): Promise>; /** * Add a new CAD 3D model to the viewer. * Call {@link Cognite3DViewer.fitCameraToModel} to see the model after the model has loaded. * @param options * @example * ```js * const options = { * modelId: 'COGNITE_3D_MODEL_ID', * revisionId: 'COGNITE_3D_REVISION_ID', * }; * viewer.addCadModel(options).then(model => { * viewer.fitCameraToModel(model, 0); * }); * ``` */ addCadModel(options: AddModelOptions): Promise; private addCadModelWithSequencer; /** * Add a new pointcloud 3D model to the viewer. * Call {@link Cognite3DViewer.fitCameraToModel} to see the model after the model has loaded. * @param options * @example * ```js * const options = { * modelId: 'COGNITE_3D_MODEL_ID', * revisionId: 'COGNITE_3D_REVISION_ID', * }; * viewer.addPointCloudModel(options).then(model => { * viewer.fitCameraToModel(model, 0); * }); * ``` */ addPointCloudModel(options: AddModelOptions): Promise>; private addPointCloudModelWithSequencer; /** * Adds a set of 360 images to the scene from the /datamodels API in Cognite Data Fusion. * @param datasource The data data source which holds the references to the 360 image sets. * @param dataModelIdentifier The search parameters to apply when querying Cognite Datamodels that contains the 360 images. */ add360ImageSet(datasource: 'datamodels', dataModelIdentifier: Image360DataModelIdentifier): Promise>; /** * Adds a set of 360 images to the scene from the /events API in Cognite Data Fusion. * @param datasource The CDF data source which holds the references to the 360 image sets. * @param eventFilter The metadata filter to apply when querying events that contains the 360 images. * @param add360ImageOptions Options for behaviours when adding 360 images. * @example * ```js * const eventFilter = { site_id: "12345" }; * await viewer.add360ImageSet('events', eventFilter); * ``` */ add360ImageSet(datasource: 'events', eventFilter: { [key: string]: string; }, add360ImageOptions?: AddImage360Options): Promise>; /** * Returns a list of added 360 image collections. */ get360ImageCollections(): Image360Collection[]; /** * Returns the currently entered 360 image. */ getActive360ImageInfo(): Image360WithCollection | undefined; /** * Remove a set of 360 images. * @param image360Entities * @deprecated */ remove360Images(...image360Entities: Image360[]): Promise; /** * Removes a previously added 360 image collection from the viewer. * @param imageCollection Collection to remove. */ remove360ImageSet(imageCollection: Image360Collection): void; /** * Enter visualization of a 360 image. * @param image360 The 360 image to enter. * @param revision The image revision to use. If not provided the newest revision will be shown. */ enter360Image(image360: Image360, revision?: Image360Revision): Promise; /** * Exit visualization of the 360 image. */ exit360Image(): void; /** * Check if a 360 image action can be done. * @param action The action to check if can be done. * @beta */ canDoImage360Action(action: Image360Action): boolean; /** * Do a 360 image action. * @param action The action to do. * @beta */ image360Action(action: Image360Action): Promise; /** * Removes a model that was previously added using {@link Cognite3DViewer.addModel}, * {@link Cognite3DViewer.addCadModel} or {@link Cognite3DViewer.addPointCloudModel} * . * @param model */ removeModel(model: CogniteModel): void; /** * Use to determine of which type the model is. * * @param modelId The model's id. * @param revisionId The model's revision id. * * @returns Empty string if type is not supported. * @example * ```typescript * const viewer = new Cognite3DViewer(...); * const type = await viewer.determineModelType(options.modelId, options.revisionId) * let model: CogniteModel * switch (type) { * case 'cad': * model = await viewer.addCadModel(options); * break; * case 'pointcloud': * model = await viewer.addPointCloudModel(options); * break; * default: * throw new Error('Model is not supported'); * } * viewer.fitCameraToModel(model); * ``` */ determineModelType(modelId: number, revisionId: number): Promise; private determineModelTypeInternal; /** * Add a Object3D to the viewer. * @param object * @example * ```js * const sphere = new Mesh( * new SphereGeometry(), * new MeshBasicMaterial() * ); * viewer.addObject3D(sphere); * ``` */ addObject3D(object: Object3D): void; /** * Add a CustomObject to the viewer. * Meshes in the custom object can use {@link CustomObjectEffectMaterial}, which supports * effects specific to custom objects. * @param customObject * @example * ```js * const sphere = new Mesh( * new SphereGeometry(), * new MeshBasicMaterial() * ); * const customObject = CustomObject(sphere); * customObject.isPartOfBoundingBox = false; * viewer.addCustomObject(customObject); * * // Ground plane that receives CAD shadows and texture variation * const groundMaterial = new CustomObjectEffectMaterial('#ffffff', texture); * groundMaterial.setReceivesShadow(true); * groundMaterial.setTextureVariation('hexTiling'); * const plane = new Mesh(new PlaneGeometry(100, 100), groundMaterial); * viewer.addCustomObject(CustomObject(plane)); * ``` * @beta */ addCustomObject(customObject: ICustomObject): void; /** * Remove a Object3D from the viewer. * @param object * @example * ```js * const sphere = new Mesh(new SphereGeometry(), new MeshBasicMaterial()); * viewer.addObject3D(sphere); * viewer.removeObject3D(sphere); * ``` */ removeObject3D(object: Object3D): void; /** * Remove a CustomObject from the viewer. * @param customObject * @example * ```js * const sphere = new Mesh(new SphereGeometry(), new MeshBasicMaterial()); * const customObject = CustomObject(sphere); * viewer.addCustomObject(sphere); * viewer.removeCustomObject(sphere); * ``` * @beta */ removeCustomObject(customObject: ICustomObject): void; /** * Sets the color used as the clear color of the renderer. * @param backgroundColor * @param backgroundColor.color * @param backgroundColor.alpha */ setBackgroundColor(backgroundColor: { color?: Color; alpha?: number; }): void; /** * Sets per-pixel clipping planes. Pixels behind any of the planes will be sliced away. * @param clippingPlanes The planes to use for clipping. * @example * ```js * // Hide pixels with values less than 0 in the x direction * const plane = new Plane(new Vector3(1, 0, 0), 0); * viewer.setGlobalClippingPlanes([plane]); * ``` * ```js * // Hide pixels with values greater than 20 in the x direction * const plane = new Plane(new Vector3(-1, 0, 0), 20); * viewer.setGlobalClippingPlanes([plane]); * ``` * ```js * // Hide pixels with values less than 0 in the x direction or greater than 0 in the y direction * const xPlane = new Plane(new Vector3(1, 0, 0), 0); * const yPlane = new Plane(new Vector3(0, -1, 0), 0); * viewer.setGlobalClippingPlanes([xPlane, yPlane]); * ``` * ```js * // Hide pixels behind an arbitrary, non axis-aligned plane * const plane = new Plane(new Vector3(1.5, 20, -19), 20); * viewer.setGlobalClippingPlanes([plane]); * ``` * ```js * // Disable clipping planes * viewer.setGlobalClippingPlanes([]); * ``` */ setGlobalClippingPlanes(clippingPlanes: Plane[]): void; /** * Sets per-pixel clipping planes. Pixels behind any of the planes will be sliced away. * @param clippingPlanes * @deprecated Use {@link Cognite3DViewer.setGlobalClippingPlanes} instead. */ setClippingPlanes(clippingPlanes: Plane[]): void; /** * Returns the current active global clipping planes. * @deprecated Use {@link Cognite3DViewer.getGlobalClippingPlanes} instead. */ getClippingPlanes(): Plane[]; /** * Returns the current active global clipping planes. */ getGlobalClippingPlanes(): Plane[]; /** * Returns the union of all bounding boxes in reveal, including custom objects. * @beta */ getSceneBoundingBox(): Box3; /** * Get the union of bounding box of all visual objects in the Cognite3DViewer. * @returns The visual bounding box of the Cognite3DViewer. * @beta */ getVisualSceneBoundingBox(): Box3; /** * Attempts to load the camera settings from the settings stored for the * provided model. See {@link https://docs.cognite.com/api/v1/#operation/get3DRevision} * and {@link https://docs.cognite.com/api/v1/#operation/update3DRevisions} for * information on how this setting is retrieved and stored. This setting can * also be changed through the 3D models management interface in Cognite Fusion. * If no camera configuration is stored in CDF, {@link Cognite3DViewer.fitCameraToModel} * is used as a fallback. * @param model The model to load camera settings from. */ loadCameraFromModel(model: CogniteModel): void; /** * Move camera to a place where the 3D model is visible. * It uses the bounding box of the 3D model and calls {@link Cognite3DViewer.fitCameraToBoundingBox}. * @param model The 3D model. * @param duration The duration of the animation moving the camera. Set this to 0 (zero) to disable animation. * @example * ```js * // Fit camera to model * viewer.fitCameraToModel(model); * ``` * ```js * // Fit camera to model over 500 milliseconds * viewer.fitCameraToModel(model, 500); * ``` * ```js * // Fit camera to model instantly * viewer.fitCameraToModel(model, 0); * ``` */ fitCameraToModel(model: CogniteModel, duration?: number): void; /** * Move camera to a place where a set of 3D models are visible. * @param models Optional 3D models to focus the camera on. If no models are provided the camera will fit to all models. * @param duration The duration of the animation moving the camera. Set this to 0 (zero) to disable animation. * @param restrictToMostGeometry If true, attempt to remove junk geometry from the boundingBox to allow setting a good camera position. */ fitCameraToModels(models?: CogniteModel[], duration?: number, restrictToMostGeometry?: boolean): void; /** * Move camera to a place where a all objects in the scene are visible. * @param duration The duration of the animation moving the camera. Set this to 0 (zero) to disable animation. */ fitCameraToVisualSceneBoundingBox(duration?: number): void; /** * Move camera to a place where the content of a bounding box is visible to the camera. * @param boundingBox The bounding box in world space. * @param duration The duration of the animation moving the camera. Set this to 0 (zero) to disable animation. * @param radiusFactor The ratio of the distance from camera to center of box and radius of the box. * @example * ```js * // Fit camera to bounding box over 500 milliseconds * viewer.fitCameraToBoundingBox(boundingBox, 500); * ``` * ```js * // Fit camera to bounding box instantaneously * viewer.fitCameraToBoundingBox(boundingBox, 0); * ``` * ```js * // Place the camera closer to the bounding box * viewer.fitCameraToBoundingBox(boundingBox, 500, 2); * ``` */ fitCameraToBoundingBox(boundingBox: Box3, duration?: number, radiusFactor?: number): void; /** * Typically used when you perform some changes and can't see them unless you move camera. */ requestRedraw(): void; /** * Convert a point in world space to its coordinates in the canvas. This can be used to place HTML objects near 3D objects on top of the 3D viewer. * @see {@link https://www.w3schools.com/graphics/canvas_coordinates.asp} For details on HTML Canvas Coordinates. * @param point World space coordinate. * @param normalize Optional. If true, coordinates are normalized into [0,1]. If false, the values are in the range [0, \). * @returns Returns 2D coordinates if the point is visible on screen, or `null` if object is outside screen. * @example * ```js * const boundingBoxCenter = new Vector3(); * // Find center of bounding box in world space * model.getBoundingBox(nodeId).getCenter(boundingBoxCenter); * // Screen coordinates of that point * const screenCoordinates = viewer.worldToScreen(boundingBoxCenter); * ``` * ```js * const boundingBoxCenter = new Vector3(); * // Find center of bounding box in world space * model.getBoundingBox(nodeId).getCenter(boundingBoxCenter); * // Screen coordinates of that point normalized in the range [0,1] * const screenCoordinates = viewer.worldToScreen(boundingBoxCenter, true); * ``` * ```js * const boundingBoxCenter = new Vector3(); * // Find center of bounding box in world space * model.getBoundingBox(nodeId).getCenter(boundingBoxCenter); * // Screen coordinates of that point * const screenCoordinates = viewer.worldToScreen(boundingBoxCenter); * if (screenCoordinates == null) { * // Object not visible on screen * } else { * // Object is visible on screen * } * ``` */ worldToScreen(point: Vector3, normalize?: boolean): Vector2 | null; /** * Take a screenshot from the current camera position. When drawing UI, only the viewer DOM element and its children will be included in the image. * The DOM is scaled to fit any provided resolution, and as a result some elements can be positioned incorrectly in regards to the 3D render. * * `html2canvas` is used to draw UI and this has some limitations on what CSS properties it is able to render. See {@link https://html2canvas.hertzen.com/documentation the html2canvas documentation} for details. * @param width Width of the final image. Default is current canvas size. * @param height Height of the final image. Default is current canvas size. * @param includeUI If false the screenshot will include only the rendered 3D. Default is true. * @returns A {@link https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs Data URL} of the image ('image/png'). * @example * ```js * // Take a screenshot with custom resolution * const url = await viewer.getScreenshot(1920, 1080); * ``` * ```js * // Add a screenshot with resolution of the canvas to the page * const url = await viewer.getScreenshot(); * const image = document.createElement('img'); * image.src = url; * document.body.appendChild(image); * ``` */ getScreenshot(width?: number, height?: number, includeUI?: boolean): Promise; /** * Converts a pixel coordinate to normalized device coordinate (in range [-1, 1]). * @param pixelCoords A Vector2 containing pixel coordinates relative to the 3D viewer. * @returns A Vector2 containing the normalized device coordinate (in range [-1, 1]). */ getNormalizedPixelCoordinates(pixelCoords: Vector2): Vector2; /** * Determines clicked or touched pixel coordinate as offset. * @param event An PointerEvent or WheelEvent. * @returns A Vector2 containing pixel coordinates relative to the 3D viewer. */ getPixelCoordinatesFromEvent(event: PointerEvent | WheelEvent): Vector2; /** * Creates and initialize a CustomObjectIntersectInput to be used by CustomObject.intersectIfCloser method. * @param pixelCoords A Vector2 containing pixel coordinates relative to the 3D viewer. * @returns A CustomObjectIntersectInput ready to use. * @beta */ createCustomObjectIntersectInput(pixelCoords: Vector2): CustomObjectIntersectInput; /** * Raycasting model(s) for finding where the ray intersects with the model. * @param offsetX X coordinate in pixels (relative to the domElement). * @param offsetY Y coordinate in pixels (relative to the domElement). * @returns A promise that if there was an intersection then return the intersection object - otherwise it * returns `null` if there were no intersections. * @see {@link https://en.wikipedia.org/wiki/Ray_casting} For more details on Ray casting. * @example For CAD model * ```js * const offsetX = 50 // pixels from the left * const offsetY = 100 // pixels from the top * const intersection = await viewer.getIntersectionFromPixel(offsetX, offsetY); * if (intersection) // it was a hit * console.log( * 'You hit model ', intersection.model, * ' at the node with tree index ', intersection.treeIndex, * ' at this exact point ', intersection.point * ); * ``` * * @example For point cloud * ```js * const offsetX = 50 // pixels from the left * const offsetY = 100 // pixels from the top * const intersection = await viewer.getIntersectionFromPixel(offsetX, offsetY); * if (intersection) // it was a hit * console.log( * 'You hit model ', intersection.model, * ' at the point index ', intersection.pointIndex, * ' at this exact point ', intersection.point * ); * ``` */ getIntersectionFromPixel(offsetX: number, offsetY: number): Promise>; /** * Raycasting model(s) for finding where the ray intersects with all models, including custom objects. * @param pixelCoords Pixel coordinate in pixels (relative to the domElement). * @param options * @param options.stopOnHitting360Icon * @param options.predicate Check whether a CustomObject should be intersected. * @param options.forceWindowedPick Skip point cloud and CAD full-frame pick caching for this call. * @returns A promise that if there was an intersection then return the intersection object - otherwise it * returns `null` if there were no intersections. * @beta */ getAnyIntersectionFromPixel(pixelCoords: Vector2, options?: { stopOnHitting360Icon?: boolean; predicate?: (customObject: ICustomObject) => boolean; forceWindowedPick?: boolean; }): Promise | undefined>; /** * Event function to click on 360 images. * @param event The event type. * @returns True if the event was handled, false otherwise. * @beta */ onClick360Images(event: PointerEvent): Promise; /** * Event function to move the mouse. * @param event The event type. * @returns True if the event was handled, false otherwise. * @beta */ onHover360Images(event: PointerEvent): boolean; private intersect360Icons; private intersect360Clusters; /** * Check for intersections with 360 annotations through the given pixel. * Similar to {@link Cognite3DViewer.getIntersectionFromPixel}, but checks 360 image annotations * instead of models. * @param offsetX * @param offsetY */ get360AnnotationIntersectionFromPixel(offsetX: number, offsetY: number): Promise>; /** * Finds the best next 360 image station to navigate to from the currently entered station, * given the world-space position the user clicked. * * Returning the station that is most directly "on the way" to where the user clicked. * * @param clickedWorldPosition World-space position of the user's click (e.g. from a point cloud intersection). * @returns The best matching Image360 Entity and its collection, or `undefined` if not inside a 360 image or no candidates qualify. */ findBestNext360ImageEntity(clickedWorldPosition: Vector3): Image360WithCollection | undefined; /** @private */ private getModels; /** * Creates a helper for managing viewer state. */ private createViewStateHelper; /** @private */ private animate; /** @private */ private intersectModels; private getCustomObjectIntersectionIfCloser; /** * Callback used by DefaultCameraManager to do model intersection. Made synchronous to avoid * input lag when zooming in and out. Default implementation is async. See PR #2405 for more info. * @private */ private modelIntersectionCallback; /** @private */ private recalculateBoundingBox; /** @private */ private setupDomElementResizeListener; }