BimCT SDK / WebGL2 Viewer
    Preparing search index...

    Class BimCTWebGL2Renderer

    The main BimCT WebGL2 Renderer API entry point

    Hierarchy

    • EmscriptenBaseBIMRenderer
      • BimCTWebGL2Renderer
    Index

    Constructors

    Accessors

    companionRenderers backgroundMode assetsBasePath bimctServerBasePath metadataAccessor hasTouchWidget touchWidget hasLeftToolbar leftToolbar hasHomeToolbar homeToolbar hasToolbar toolbar hasContextMenu contextMenu hasSplitElementsUI hasSettingsWindow settingsWindow hasTimeChangerWindow hasComparisonViewer comparisonViewer hasMinimapViewer minimapViewer hasShareWindow shareWindow hasWebXRWindow webXRWindow hasSnapshotWindow snapshotWindow hasMapExportWindow mapExportindow hasViewsManager viewsManager hasMessageWindow messageWindow hasPropertiesWindow propertiesWindow hasFilterElementsWindow filterElementsWindow hasDesignTreeWindow designTreeWindow baseCanvas dynamicElements transformationGismo animations state allowPicking2DElements measurementSystem canvasCursor overlay clipping divElement sceneState measurements displayFormat sensors terrain pins legend alignment guiActionsLockedEvent timeChangedEvent destroyedEvent selectionChangeEvent visibilityChangeEvent mapPositionChangeEvent pinInsertEvent pinClickedEvent pinMovedEvent pinHighlightedEvent pinDehighlightedEvent mouseRightClickedEvent contextMenuEvent modelLoadedEvent modelAddedEvent modelRemovedEvent stateChangedEvent xrChangedEvent pickLinesUpdatedEvent measurementsSelectedEvent measurementsUpdatedEvent measurementsDeletedEvent measurementsPointPushBackEvent isRotatingOrPanning hasSelectionLabelEnabled cuttingElements elements selectedElements selectedElementIds selectedElementInternalIds shadingMode snappingEnabled settingsChangedEvent cameraChangedEvent resizedEvent languageChangedEvent modalWindowShowEvent renderingContext gpuInfo autoCameraResetAfterModelLoaded showProgressWhileModelLoading isDrawing inputHandler pickLines xrPanels xrPreviewToCanvas currentFPS

    Methods

    registerCompanionRenderer unregisterCompanionRenderer unregisterAllCompanionRenderers changeLanguage currentLanguage supportedLanguages screenToWorldPosition screenToWorldPositionNoDepth worldToScreenSpacePosition worldToEarthPosition earthToWorldSpacePosition checkGUIActionsLocked isKeyDown isRollOverEnabled revertPreviousRollOver doRollOver markMouseActionEventMade getSkymapIds removeSkymap loadSkymapById loadSkymap setSSAOEnabled setGroundShadowEnabled setSceneDateAndTime refreshSolarPosition refreshCloudsPosition setSunLightEnabled setSunFlareEnabled setShadowMapsEnabled setPointCloudPixelSize setGridEnabled setMeasurementSystem dispatchContextMenu dispatchStateChanged clearSelection isPropertiesWindowShowing hidePropertiesWindow isDesignTreeWindowShowing hideDesignTreeWindow isViewsWindowShowing showViewsWindow hideViewsWindow isFilterElementsWindowShowing hideFilterElementsWindow isSettingsWindowShowing isShareWindowShowing isWebXRWindowShowing isSnapshotWindowShowing isMapExportWindowShowing isViewsWindowsShowing isMessageWindowShowing hideSettingsWindow hideShareWindow hideWebXRWindow hideSnapshotWindow hideMapExportWindow hideViewsWindows hideMessageWindow messageBox inputTextMessageBox inputNumberMessageBox inputUnitMessageBox hideAllWindows isContextMenuShowing hideMenus hideContextMenu setPickModeChangeClearsMeasurements isPickModeChangeClearsMeasurements getPickMode isPickingElements isPickingFaces isPickingFacesOrElements isPickingMeasurements isPickingLines isPickingIsometric recomputeSnappingPoints recomputeCameraMovementSettings startOcclusionCulling stopOcclusionCulling getSceneBoundingBox getGeolocatedSceneCenterAtGroundLevel getGeolocatedSceneBoundingBox getVisibleRegion2D getVisibleElementsBoundingBox getModelBoundingBox getGeolocatedBoundingBox setBoundingBoxVisible isBoundingBoxVisible redrawBoundingBox setNormalArrowVisible getElementsBoundingBox is2DVisualizer getFacesBoundingBox set2DBoundingBox rotateCamera2D set2DVisualizerOn is3DElement pickElementIds pickExtrusions pickRubberbandElementIds pickRubberbandMeasurementIds pickRubberbandFaceIds pickNormal pickFaceId getElementsSelectionMode pickFaceIds getPaperIdOfElementId setSelectionLabelEnabled updateSelectionLabel updateSelectionFromHighlight updateSelectionByInternalIds updateSelectionByElementNodes updateSelectionByElementIds updateSelectionByGlobalIds showAllElements getHighlightedInternalIds resetHybridMode setElementsHybridOpaque colorizeInternalIds decolorizeInternalIds colorizeSelectedElements decolorizeSelectedElements decolorizeAllElements getVisibleInternalIds selectAllElements selectByIds selectByInternalIds selectByElementInfo selectAllVisibleElements selectByModel selectByClass selectByLayer selectByMaterial selectByType selectByStorey selectByMembership selectByFilters selectElementsByProperty hideSelectedElements hideElementsByGlobalId hideElementsByInternalId hideElementsByElementId showElementsByGlobalId showElementsByElementId isolateSelectedElements isolateElementsByInternalId setElementsVisible isElementVisible setKey zoomToElementsByGlobalIds zoomToElementsByElementIds zoomToSelectedElements zoomToSelection lookAtBoundingBox resetCameraToHome isGameModeOn setCameraType setSelectionType getSelectionType resetCamera3D startIsometricMeasure startAutoCountMeasure setMeasurementOptions getMeasurementOptions clearMeasurementOptions addNewMeasurement clearMeasurements clearPins focus refreshCuttingPlaneLabel clearCuttingPlanes activateArbitraryCuttingPlane activateCuttingPlaneOnFaceId activateCuttingPlane deactivateCuttingPlane isCuttingPlaneEnabled isCuttingPlaneActive getImageData getImageDataGzipped isInitialized unloadAll refreshCameraCube setCameraCubeVisible isCameraCubeVisible setCameraCompassVisible isCameraCompassVisible zoomToElements zoomExtents checkElementsShowing takeSnapshot takeSnapshotAndGetExternalURL getDynamicElementsState setDynamicElementsState getClippingRegionsState setClippingRegionsState getCameraState setCameraState getVisibilityState setVisibilityState getColorizationState getMarkupState setMarkupState getSensorsState setSensorsState getPinState setPinState getHybridState setHybridState setColorizationState getViewerSettingsState setViewerSettingsState getHighlightedState setHighlightedState getMeasurementsState setMeasurementsState getCuttingPlanesState getSplittedElementsState setSplittedElementsState setCuttingPlanesState getSceneView setSceneView isMobileRenderer internalEngine init unloadModel BR3D_SetShapeDistanceCulling BR3D_GetShapeDistanceCulling BR3D_SetShapeResolutionCoefficient BR3D_GetShapeResolutionCoefficient BR3D_Debug_GetModelElementIDs BR3D_PushBackCutterPointAtClick isCameraTransitioning BR3D_IsCutterPointControlPoint BGK_DeleteExtrusion BGK_ChangeDataVerticesApplyMatrix BGK_AddNamedTexture BGK_SetFillPattern BGK_SetLineColor BGK_SetFillColor BGK_SetLineDirection BGK_SetExtrusionDistance BGK_SetExtrusionLength BGK_SetSolidLineThickness BGK_SetExtrusionSlope BGK_InitKernel BGK_ReleaseKernel BRLOADER_SetLoadingSettings setLoadingColorOverride clearLoadingColorOverride beginDrawLoop refreshRedrawNeeded destroy setPickMode resetLastRedrawExecuted requestLineWithLengthMeasurement requestScaleMeasurement isWaitingForRubberbandSelection isWaitingForLineWithLengthSelection registerCompanionRendererAndWaitForRequest requestRubberbandSelection addCustomScale cancelCustomScale addClippingRegion removeClippingRegion startPinAdditionByColor startPinAdditionByImage startCuttingPlaneAddition startLengthMeasure startAreaMeasure startCountMeasure loadDataMsgPack loadModelAndCache loadModelAndCache2 getModelsWithURLState setModelsWithURLState loadModelFromUrl cloneModel reloadModelWithMatrix loadModel stopRendering startRendering isRenderingStopped checkVRSupported isVR_SessionStarted stopVR_Session setXRPreviewToCanvas resetXRVisibilityState startVR_Session addComparisonRenderer removeComparisonRenderer isComparing setGUIActionsLocked

    Constructors

    • Create a new emscripten renderer

      Parameters

      • divElement: HTMLDivElement

        An empty div element that will be used as a wrapper for all the renderer elements

      • OptionalinitializationOptions: RendererInitializationOptions

        Initialization Options

      Returns BimCTWebGL2Renderer

    Accessors

    • get companionRenderers(): BaseRenderer[]

      Gets the list of companion renderers.

      Returns BaseRenderer[]

    • get backgroundMode(): boolean

      Returns boolean

    • set backgroundMode(value: boolean): void

      Parameters

      • value: boolean

      Returns void

    • get assetsBasePath(): string

      Gets the base path for assets.

      Returns string

      The base path for assets.

    • get bimctServerBasePath(): string

      Gets the base path for the BimCT additional functions server.

      Returns string

      The base path for the BimCT server.

    • get metadataAccessor(): BimCTMetadataAccessor

      Gets the metadata accessor.

      Returns BimCTMetadataAccessor

      The metadata accessor.

    • get hasTouchWidget(): boolean

      Checks if the touch widget is available.

      Returns boolean

      Whether the touch widget is available.

    • get touchWidget(): BimCTTouchCursor

      Gets the touch widget.

      Returns BimCTTouchCursor

      The touch widget.

    • get hasLeftToolbar(): boolean

      Checks if the left toolbar is available.

      Returns boolean

      Whether the left toolbar is available.

    • get leftToolbar(): BimCTLeftToolbar

      Gets the left toolbar.

      Returns BimCTLeftToolbar

      The left toolbar.

    • get hasHomeToolbar(): boolean

      Checks if the home toolbar is available.

      Returns boolean

      Whether the home toolbar is available.

    • get homeToolbar(): BimCTHomeToolbar

      Gets the home toolbar.

      Returns BimCTHomeToolbar

      The home toolbar.

    • get hasToolbar(): boolean

      Checks if the toolbar is available.

      Returns boolean

      Whether the toolbar is available.

    • get toolbar(): BimCTToolbar

      Gets the toolbar.

      Returns BimCTToolbar

      The toolbar.

    • get hasContextMenu(): boolean

      Checks if the context menu is available.

      Returns boolean

      Whether the context menu is available.

    • get contextMenu(): BimCTContextMenu

      Gets the context menu.

      Returns BimCTContextMenu

      The context menu.

    • get hasSplitElementsUI(): boolean

      Checks if the split elements UI is available.

      Returns boolean

      Whether the split elements UI is available.

    • get hasSettingsWindow(): boolean

      Checks if the settings window is available.

      Returns boolean

      Whether the settings window is available.

    • get settingsWindow(): BimCTSettingsWindow

      Gets the settings window.

      Returns BimCTSettingsWindow

      The settings window.

    • get hasTimeChangerWindow(): boolean

      Checks if the time changer window is available.

      Returns boolean

      Whether the time changer window is available.

    • get hasComparisonViewer(): boolean

      Checks if the comparison viewer is available.

      Returns boolean

    • get comparisonViewer(): BimCTComparisonViewer

      Gets the comparison viewer.

      Returns BimCTComparisonViewer

    • get hasMinimapViewer(): boolean

      Checks if the comparison viewer is available.

      Returns boolean

    • get minimapViewer(): BimCTMiniMapViewer

      Gets the instance of the minimap viewer.

      Returns BimCTMiniMapViewer

      The instance of the minimap viewer.

    • get hasShareWindow(): boolean

      Checks if the share window is available.

      Returns boolean

      Whether the share window is available.

    • get shareWindow(): BimCTShareWindow

      Gets the share window.

      Returns BimCTShareWindow

      The share window.

    • get hasWebXRWindow(): boolean

      Checks if the WebXR window is available.

      Returns boolean

      Whether the WebXR window is available.

    • get webXRWindow(): BimCTWebXRWindow

      Gets the WebXR window.

      Returns BimCTWebXRWindow

      The WebXR window.

    • get hasSnapshotWindow(): boolean

      Checks if the snapshot window is available.

      Returns boolean

      Whether the snapshot window is available.

    • get snapshotWindow(): BimCTSnapshotWindow

      Gets the snapshot window.

      Returns BimCTSnapshotWindow

      The snapshot window.

    • get hasMapExportWindow(): boolean

      Gets if export to map window is available.

      Returns boolean

      Whether the export to map window is available.

    • get mapExportindow(): BimCTExportToMap

      Gets the export to map window.

      Returns BimCTExportToMap

      The export to map window.

    • get hasViewsManager(): boolean

      Checks if the views manager is available.

      Returns boolean

      Whether the views manager is available.

    • get hasMessageWindow(): boolean

      Checks if the message window is available.

      Returns boolean

      Whether the message window is available.

    • get hasPropertiesWindow(): boolean

      Returns boolean

    • get hasFilterElementsWindow(): boolean

      Returns boolean

    • get hasDesignTreeWindow(): boolean

      Returns boolean

    • get baseCanvas(): BaseBimCanvas

      Gets the base canvas.

      Returns BaseBimCanvas

      The base canvas.

    • get dynamicElements(): DynamicElements

      Gets the dynamic elements.

      Returns DynamicElements

      The dynamic elements.

    • get transformationGismo(): TransformationGizmo

      Gets the transformation gismo.

      Returns TransformationGizmo

      The transformation gismo.

    • get animations(): Animations

      Gets the animations.

      Returns Animations

      The animations.

    • get state(): RendererState

      Gets the state of the renderer.

      Returns RendererState

      The state of the renderer.

    • get allowPicking2DElements(): boolean

      Gets whether picking 2D elements is allowed.

      Returns boolean

      Whether picking 2D elements is allowed.

    • set allowPicking2DElements(allowPicking2DElements: boolean): void

      Sets whether picking 2D elements is allowed.

      Parameters

      • allowPicking2DElements: boolean

        Whether to allow picking 2D elements.

      Returns void

    • get measurementSystem(): MEASUREMENT_SYSTEM

      Gets the measurement system.

      Returns MEASUREMENT_SYSTEM

      The measurement system.

    • set canvasCursor(cursor: BaseBimCanvasCursor): void

      Sets the canvas cursor.

      Parameters

      Returns void

    • get overlay(): BimCTOverlay

      Gets the overlay.

      Returns BimCTOverlay

      The overlay.

    • get divElement(): HTMLDivElement

      Gets the div element.

      Returns HTMLDivElement

      The div element.

    • get sceneState(): SceneState

      Keeps tracking of loaded models and elements. See [[SceneState]].

      Returns SceneState

      The scene state.

    • get measurements(): MeasurementsState

      Gets the measurements state.

      Returns MeasurementsState

      The measurements state.

    • get displayFormat(): DisplayFormat

      Gets the display format.

      Returns DisplayFormat

    • get sensors(): SensorManager

      Gets the sensor manager.

      Returns SensorManager

      The sensor manager.

    • get terrain(): TerrainManager

      Gets the terrain manager.

      Returns TerrainManager

      The terrain manager.

    • get pins(): Pins

      Gets the pins.

      Returns Pins

      The pins.

    • get legend(): Legend

      Returns Legend

    • get alignment(): BimCTAlignment

      Returns the alignment cofiguration handler of the BimCT scene models.

      Returns BimCTAlignment

    • get guiActionsLockedEvent(): IEvent<BaseRenderer, boolean>

      Gets the GUI actions locked event.

      Returns IEvent<BaseRenderer, boolean>

      The GUI actions locked event.

    • get timeChangedEvent(): IEvent<BaseRenderer, Date>

      Gets the solar position changed event.

      Returns IEvent<BaseRenderer, Date>

      The the solar position changed event.

    • get destroyedEvent(): IEvent<BaseRenderer, void>

      Returns IEvent<BaseRenderer, void>

    • get selectionChangeEvent(): IEvent<BaseRenderer, ElementInfo[]>

      Gets the selection change event.

      Returns IEvent<BaseRenderer, ElementInfo[]>

      The selection change event.

    • get visibilityChangeEvent(): ISimpleEvent<BaseRenderer>

      Gets the visibility change event.

      Returns ISimpleEvent<BaseRenderer>

      The visibility change event.

    • get mapPositionChangeEvent(): IEvent<BaseRenderer, WGS84>

      Gets the map position change event.

      Returns IEvent<BaseRenderer, WGS84>

      The map position change event.

    • get pinInsertEvent(): IEvent<BaseRenderer, PinWidget3D>

      Gets the pin insert event.

      Returns IEvent<BaseRenderer, PinWidget3D>

      The pin insert event.

    • get pinHighlightedEvent(): IEvent<BaseRenderer, PinWidget3D>

      Gets the pin highlighted event.

      Returns IEvent<BaseRenderer, PinWidget3D>

      The pin highlighted event.

    • get pinDehighlightedEvent(): IEvent<BaseRenderer, PinWidget3D>

      Gets the pin dehighlighted event.

      Returns IEvent<BaseRenderer, PinWidget3D>

      The pin dehighlighted event.

    • get mouseRightClickedEvent(): IEvent<BaseRenderer, UIEvent>

      Gets the mouse right clicked event.

      Returns IEvent<BaseRenderer, UIEvent>

      The mouse right clicked event.

    • get contextMenuEvent(): IEvent<BaseRenderer, PointerEvent>

      Gets the context menu event.

      Returns IEvent<BaseRenderer, PointerEvent>

      The context menu event.

    • get modelLoadedEvent(): IEvent<BaseRenderer, Int64[]>

      Gets the model loaded event, called after a sceneView is also loaded

      Returns IEvent<BaseRenderer, Int64[]>

      The model loaded event.

    • get modelAddedEvent(): IEvent<BaseRenderer, Int64[]>

      Gets the model added event, called directly after model is loaded into GPU. (no scenes after that)

      Returns IEvent<BaseRenderer, Int64[]>

      the model added event

    • get modelRemovedEvent(): IEvent<BaseRenderer, Int64[]>

      Gets the model removed event.

      Returns IEvent<BaseRenderer, Int64[]>

      The model removed event.

    • get stateChangedEvent(): ISimpleEvent<BaseRenderer>

      Gets the state changed event.

      Returns ISimpleEvent<BaseRenderer>

      The state changed event.

    • get pickLinesUpdatedEvent(): IEvent<BaseRenderer, Measurement[]>

      Gets the pick lines updated event.

      Returns IEvent<BaseRenderer, Measurement[]>

      The pick lines updated event.

    • get measurementsSelectedEvent(): IEvent<BaseRenderer, Measurement[]>

      Gets the measurements selected event.

      Returns IEvent<BaseRenderer, Measurement[]>

      The measurements selected event.

    • get measurementsUpdatedEvent(): IEvent<BaseRenderer, Measurement[]>

      Gets the measurements updated event.

      Returns IEvent<BaseRenderer, Measurement[]>

      The measurements updated event.

    • get measurementsDeletedEvent(): IEvent<
          BaseRenderer,
          { id: Int64; userObject: any }[],
      >

      Gets the measurements deleted event.

      Returns IEvent<BaseRenderer, { id: Int64; userObject: any }[]>

      The measurements deleted event.

    • get measurementsPointPushBackEvent(): IEvent<BaseRenderer, Measurement[]>

      Gets the measurements point push back event.

      Returns IEvent<BaseRenderer, Measurement[]>

      The measurements point push back event.

    • get isRotatingOrPanning(): boolean

      Gets whether the renderer is rotating or panning.

      Returns boolean

      Whether the renderer is rotating or panning.

    • set isRotatingOrPanning(isRotatingOrPanning: boolean): void

      Sets whether the renderer is rotating or panning.

      Parameters

      • isRotatingOrPanning: boolean

        Whether the renderer is rotating or panning.

      Returns void

    • get hasSelectionLabelEnabled(): boolean

      Checks if the selection label is enabled.

      Returns boolean

      Whether the selection label is enabled.

    • get cuttingElements(): CuttingElementsManager

      Gets the cutting elements manager.

      Returns CuttingElementsManager

      The cutting elements manager.

    • get elements(): ElementInfo[]

      Gets the elements.

      Returns ElementInfo[]

      The elements.

    • get selectedElements(): ElementInfo[]

      Gets the selected elements.

      Returns ElementInfo[]

      The selected elements.

    • get selectedElementIds(): Int64[]

      Gets the selected element IDs.

      Returns Int64[]

      The selected element IDs.

    • get selectedElementInternalIds(): Int64[]

      Gets the selected element internal IDs.

      Returns Int64[]

      The selected element internal IDs.

    • get shadingMode(): SHADING_MODE

      Gets the shading mode.

      Returns SHADING_MODE

      The shading mode.

    • set shadingMode(mode: SHADING_MODE): void

      Sets the shading mode of the renderer.

      Parameters

      Returns void

    • get snappingEnabled(): boolean

      Gets whether snapping is enabled.

      Returns boolean

      Whether snapping is enabled.

    • get settingsChangedEvent(): SimpleEventDispatcher<BaseRenderer>

      Gets the settings changed event.

      Returns SimpleEventDispatcher<BaseRenderer>

      The settings changed event.

    • get cameraChangedEvent(): EventDispatcher<BaseRenderer, CameraEvent>

      Gets the camera change event.

      Returns EventDispatcher<BaseRenderer, CameraEvent>

      The camera state change event.

    • get resizedEvent(): EventDispatcher<
          BaseRenderer,
          { width: number; height: number },
      >

      Gets the resized event.

      Returns EventDispatcher<BaseRenderer, { width: number; height: number }>

      The resized event.

    • get languageChangedEvent(): EventDispatcher<BaseRenderer, Language>

      Gets the language changed event.

      Returns EventDispatcher<BaseRenderer, Language>

      The language changed event.

    • get modalWindowShowEvent(): EventDispatcher<BaseRenderer, ModalWindowShownEvent>

      Gets the resized event.

      Returns EventDispatcher<BaseRenderer, ModalWindowShownEvent>

      The resized event.

    • get renderingContext(): WebGL2RenderingContext

      Returns the WebGL2 rendering context.

      Returns WebGL2RenderingContext

    • get gpuInfo(): GPUInfo

      Returns the GPU information.

      Returns GPUInfo

    • get autoCameraResetAfterModelLoaded(): boolean

      Gets the auto camera reset state after model is loaded.

      Returns boolean

    • set autoCameraResetAfterModelLoaded(v: boolean): void

      Sets the auto camera reset state after model is loaded.

      Parameters

      • v: boolean

      Returns void

    • get showProgressWhileModelLoading(): boolean

      Gets the show progress state while model is loading.

      Returns boolean

    • set showProgressWhileModelLoading(v: boolean): void

      Sets the show progress state while model is loading.

      Parameters

      • v: boolean

      Returns void

    • get isDrawing(): boolean

      Checks if the renderer is currently drawing.

      Returns boolean

    • get inputHandler(): EnhancedInputHandler

      Gets the input handler.

      Returns EnhancedInputHandler

    • get pickLines(): PickLineState

      Gets the pick lines state.

      Returns PickLineState

    • get xrPanels(): BimCTXrPanelsController

      Returns BimCTXrPanelsController

    • get xrPreviewToCanvas(): boolean

      Returns boolean

    • get currentFPS(): number

      Returns number

    Methods

    • Registers a companion renderer.

      Parameters

      Returns void

    • Unregisters a companion renderer.

      Parameters

      Returns void

    • Unregisters all companion renderers.

      Returns void

    • Changes the language of the renderer.

      Parameters

      • lang: Language

        The language to change to.

      Returns void

    • Get the currently used Language

      Returns Language

      the current Language

    • Returns the supported Languages

      Returns Language[]

      the supported Languages

    • Converts screen coordinates to world position.

      Parameters

      • x: number

        The x-coordinate on the screen.

      • y: number

        The y-coordinate on the screen.

      Returns Promise<Vector3D>

      A promise that resolves to the world position.

    • Converts screen coordinates to world position without taking depth into account.

      Parameters

      • x: number

        The x-coordinate on the screen.

      • y: number

        The y-coordinate on the screen.

      Returns Promise<Vector3D>

      A promise that resolves to the world position.

    • Converts world coordinates to screen space position.

      Parameters

      Returns Promise<{ point: Point2D; insideFrustum: boolean }>

      A promise that resolves to the screen space position and whether it is inside the frustum.

    • Converts 3D world position to real earth coordinates, using the current scene wgs84 center coordinate as a reference. If you have another reference other than the scene center, you can use [[cartesianToWGS84]] directly.

      Parameters

      • point: Vector3D

        The world coordinates.

      • OptionalsceneBoundingBox: BoundingBox3D

        Optional bounding box of the scene to use as reference. If not provided, the scene bounding box will be used.

      • Optionalalignment: WGS84Alignment

      Returns Promise<WGS84>

      A promise that resolves to the earth coordinates.

    • Converts earth coordinates to 3D world space position, using the current scene wgs84 center coordinate as a reference. If you have another reference other than the scene center, you can use [[wgs84ToCartesian]] directly.

      Parameters

      • coord: WGS84

        The earth coordinates.

      • OptionalsceneBoundingBox: BoundingBox3D

        Optional bounding box of the scene to use as reference. If not provided, the scene bounding box will be used.

      • Optionalalignment: WGS84Alignment

        Optional alignment information for the scene. If not provided, the scene alignment will be used better to provide it if you have it already calculated for performance reasons.

      Returns Promise<Vector3D>

      A promise that resolves to the world space position.

    • Checks if GUI actions are locked.

      Returns boolean

      Whether GUI actions are locked.

    • Checks if a key is pressed.

      Parameters

      • code: string

        The key code to check.

      Returns boolean

      Whether the key is pressed.

    • Checks if roll over is enabled.

      Returns boolean

      Whether roll over is enabled.

    • Reverts the previous roll over.

      Parameters

      • reset: boolean = false

        Whether to reset the roll over.

      Returns Promise<void>

    • Performs roll over at the specified coordinates.

      Parameters

      • x: number

        The x-coordinate.

      • y: number

        The y-coordinate.

      Returns Promise<void>

    • Marks that a mouse action event has been made.

      Returns void

    • Gets the skymap IDs.

      Returns Map<string, string>

      A map of skymap IDs.

    • Removes the skymap.

      Returns Promise<void>

    • Loads a skymap by its ID.

      Parameters

      • skymapId: "grass" | "desert" | "farm"

        The ID of the skymap.

      • showLoading: boolean = true

        Whether to show the loading screen.

      Returns Promise<boolean>

      A promise that resolves to a boolean indicating success or failure.

    • Loads a skymap from URLs.

      Parameters

      • skymapURL: string

        The URL of the skymap.

      • cloudsURL: string

        The URL of the clouds.

      Returns Promise<void>

    • Sets SSAO (Screen Space Ambient Occlusion) enabled or disabled.

      Parameters

      • enabled: boolean

        Whether to enable or disable SSAO.

      Returns Promise<void>

    • Sets ground shadow enabled or disabled.

      Parameters

      • enabled: boolean

        Whether to enable or disable ground shadow.

      Returns Promise<void>

    • Sets the scene date and time.

      Parameters

      • dateAndTime: Date

        The date and time to set.

      • OptionalshowDateTimePopup: boolean

        Whether to show the date and time popup.

      Returns Promise<void>

    • Refreshes the solar position.

      Parameters

      • showDateTime: boolean = ...

        Whether to show the date and time.

      • forceDispatchTimeChangedEvent: boolean = false

      Returns Promise<void>

    • Refreshes the position of the clouds.

      Returns Promise<void>

    • Sets sun light enabled or disabled.

      Parameters

      • enabled: boolean

        Whether to enable or disable sun light.

      Returns Promise<void>

    • Sets sun flare enabled or disabled.

      Parameters

      • enabled: boolean

        Whether to enable or disable sun flare.

      Returns Promise<void>

    • Sets shadow maps enabled or disabled.

      Parameters

      • enabled: boolean

        Whether to enable or disable shadow maps.

      • Optionalquality: BIM_SHADOWS_QUALITY

        The quality of the shadow maps.

      Returns Promise<void>

    • Sets the pixel size of point clouds.

      Parameters

      • size: number

        The pixel size.

      Returns Promise<void>

    • Sets the grid enabled or disabled.

      Parameters

      • enabled: boolean

        Whether to enable or disable the grid.

      Returns Promise<void>

    • Sets the measurement system.

      Parameters

      Returns Promise<void>

    • Dispatches the context menu event.

      Parameters

      • evt: PointerEvent

        The pointer event.

      Returns number

    • Dispatches the state changed event.

      Returns void

    • Clears the selection.

      Returns Promise<void>

    • Checks if the properties window is showing.

      Returns boolean

      Whether the properties window is showing.

    • Hides the properties window.

      Returns void

    • Checks if the design tree window is showing.

      Returns boolean

      Whether the design tree window is showing.

    • Hides the design tree window.

      Returns void

    • Checks if the views window is showing.

      Returns boolean

      Whether the views window is showing.

    • Shows the views window.

      Returns void

    • Hides the views window.

      Returns void

    • Checks if the filter elements window is showing.

      Returns boolean

      Whether the filter elements window is showing.

    • Hides the filter elements window.

      Returns void

    • Checks if the settings window is showing.

      Returns boolean

      Whether the settings window is showing.

    • Checks if the share window is showing.

      Returns boolean

      Whether the share window is showing.

    • Checks if the WebXR window is showing.

      Returns boolean

      Whether the WebXR window is showing.

    • Checks if the snapshot window is showing.

      Returns boolean

      Whether the snapshot window is showing.

    • Checks if the map export window is showing.

      Returns boolean

      Whether the map export window is showing.

    • Checks if any views windows are showing.

      Returns boolean

      Whether any views windows are showing.

    • Checks if the message window is showing.

      Returns boolean

      Whether the message window is showing.

    • Hides the settings window.

      Returns void

    • Hides the share window.

      Returns void

    • Hides the WebXR window.

      Returns void

    • Hides the snapshot window.

      Returns void

    • Hides the map export window.

      Returns void

    • Hides all views windows.

      Returns void

    • Hides the message window.

      Returns void

    • Shows a message box.

      Parameters

      • message: string

        The message to display.

      • title: string = 'Message'

        The title of the message box.

      • option: MessageOption = MessageOption.OKCANCEL

        The options for the message box.

      • icon: MessageIcon = MessageIcon.INFO

        The icon for the message box.

      Returns Promise<MessageResult>

      A promise that resolves to the result of the message box.

    • Shows an input text message box.

      Parameters

      • message: string

        The message to display.

      • title: string = 'Message'

        The title of the message box.

      • value: string = ''

        The default value of the input.

      • icon: MessageIcon = MessageIcon.INFO

        The icon for the message box.

      Returns Promise<string>

      A promise that resolves to the input text.

    • Shows an input number message box.

      Parameters

      • message: string

        The message to display.

      • title: string = 'Message'

        The title of the message box.

      • value: number = undefined

        The default value of the input.

      • icon: MessageIcon = MessageIcon.INFO

        The icon for the message box.

      Returns Promise<number>

      A promise that resolves to the input number.

    • Shows an input number message box.

      Parameters

      • message: string

        The message to display.

      • title: string = 'Message'

        The title of the message box.

      • valueInMM: number = undefined

        The default value of the input in millimeters

      • icon: MessageIcon = MessageIcon.INFO

        The icon for the message box.

      Returns Promise<number>

      A promise that resolves to the input number in millimeters

    • Hides all windows.

      Returns void

    • Checks if the context menu is showing.

      Returns boolean

      Whether the context menu is showing.

    • Hides the menus.

      Returns boolean

      Whether the context menu was hidden.

    • Hides the context menu.

      Returns boolean

      Whether the context menu was hidden.

    • When set to true, the pick mode and setSelectionType change will clear measurements. By default, this is true.

      Parameters

      • on: boolean

      Returns void

    • Returns boolean

      Whether the pick mode change clears measurements.

    • Checks if picking elements is enabled.

      Returns boolean

      Whether picking elements is enabled.

    • Checks if picking faces is enabled.

      Returns boolean

      Whether picking faces is enabled.

    • Checks if picking faces or elements is enabled.

      Returns boolean

      Whether picking faces or elements is enabled.

    • Checks if picking measurements is enabled.

      Returns boolean

      Whether picking measurements is enabled.

    • Checks if picking lines is enabled.

      Returns boolean

      Whether picking lines is enabled.

    • Checks if picking isometric is enabled.

      Returns boolean

      Whether picking isometric is enabled.

    • Recomputes the snapping points.

      Returns Promise<boolean>

      A promise that resolves to a boolean indicating success or failure.

    • Recomputes the camera movement settings.

      Returns Promise<void>

    • Starts occlusion culling.

      Returns Promise<void>

    • Stops occlusion culling.

      Returns Promise<void>

    • Gets the bounding box of the scene.

      Returns Promise<BoundingBox3D>

      A promise that resolves to the bounding box of the scene.

    • Gets the geolocated center of the scene at ground level.

      Parameters

      • OptionalsceneBoundingBox: BoundingBox3D

        the scene bounding box to use, if not provided it will be fetched

      • useAltitude: boolean = false

      Returns Promise<WGS84>

      A promise that resolves to the WGS84 coordinates of the center point at ground level.

    • Gets the bounding box of the scene.

      Parameters

      • useAltitude: boolean = false

        whether to use altitude from minimap viewer

      • OptionalsceneBoundingBox: BoundingBox3D

        the scene bounding box to use, if not provided it will be fetched

      Returns Promise<WGS84BoundingBox>

      A promise that resolves to the bounding box of the scene.

    • Returns the visible region of the scene in 2D Visualuzer mode only

      Returns Promise<BoundingBox3D>

      A promise that resolves to the bounding box of the visible region in 3D scene coordinates.

    • Gets the bounding box of visible elements.

      Returns Promise<BoundingBox3D>

      A promise that resolves to the bounding box of visible elements.

    • Gets the bounding box of a model.

      Parameters

      • modelID: Int64

        The ID of the model.

      • forceRecalculation: boolean = false

        Whether to force recalculation of the bounding box.

      Returns Promise<BoundingBox3D>

      A promise that resolves to the bounding box of the model.

    • Calculates the geolocated bounding box in WGS84 coordinates from the Ground Level center.

      Parameters

      • bBox: BoundingBox3D

        The 3D bounding box to be converted.

      • OptionalsceneBoundingBox: BoundingBox3D

        Optional scene bounding box to use for center calculation if not provided it will be fetched.

      • OptionaluseAltitude: boolean

      Returns Promise<WGS84BoundingBox>

      A new WGS84BoundingBox object representing the geolocated bounding box.

    • Sets the visibility of a bounding box.

      Parameters

      • bBox: BoundingBox3D

        The bounding box to set visibility for.

      • visible: boolean

        Whether to set the bounding box visible or not.

      • rgb: RGB = ...

        The color of the bounding box.

      • solid: boolean = false

      Returns Promise<void>

    • Checks if the bounding box is visible.

      Returns boolean

      Whether the bounding box is visible.

    • Redraws the bounding box if it is visible.

      Returns Promise<void>

    • Sets the visibility of a normal arrow.

      Parameters

      • point: Vector3D

        The point of the arrow.

      • direction: Vector3D

        The direction of the arrow.

      • length: number

        The length of the arrow.

      • visible: boolean

        Whether to set the arrow visible or not.

      • rgb: RGB = ...

        The color of the arrow.

      Returns Promise<void>

    • Gets the bounding box of elements.

      Parameters

      • internalIds: Int64[]

        The internal IDs of the elements.

      Returns Promise<BoundingBox3D>

      A promise that resolves to the bounding box of the elements.

    • Returns boolean

    • Gets the bounding box of faces.

      Parameters

      • internalIds: Int64[]

        The internal IDs of the faces.

      Returns Promise<BoundingBox3D>

      A promise that resolves to the bounding box of the faces.

    • Sets the 2D bounding box.

      Parameters

      Returns void

    • Rotates the 2D camera to the specified position.

      Parameters

      Returns Promise<boolean>

      A promise that resolves to a boolean indicating success or failure.

    • Sets the 2D visualizer on or off.

      Parameters

      • on: boolean

        Whether to set the 2D visualizer on or off.

      • animate: boolean

        Whether to animate the transition.

      • dispatchStateChanged: boolean = true
      • force: boolean = false

      Returns Promise<void>

    • Checks if the element is a 3D element.

      Parameters

      • rendererId: Int64

        The renderer ID of the element.

      Returns Promise<boolean>

      A promise that resolves to a boolean indicating if the element is a 3D element.

    • Picks element IDs within the specified rectangle.

      Parameters

      • x: number

        The x-coordinate of the top-left corner of the rectangle.

      • y: number

        The y-coordinate of the top-left corner of the rectangle.

      • w: number

        The width of the rectangle.

      • h: number

        The height of the rectangle.

      Returns Promise<Int64[]>

      A promise that resolves to an array of picked element IDs.

    • Parameters

      • x: number
      • y: number
      • w: number
      • h: number

      Returns Promise<Measurement[]>

    • Picks element IDs within the specified rubberband rectangle.

      Parameters

      • sx: number

        The x-coordinate of the start point.

      • sy: number

        The y-coordinate of the start point.

      • ex: number

        The x-coordinate of the end point.

      • ey: number

        The y-coordinate of the end point.

      Returns Promise<Int64[]>

      A promise that resolves to an array of picked element IDs.

    • Picks measurement IDs within the specified rubberband rectangle.

      Parameters

      • sx: number

        The x-coordinate of the start point.

      • sy: number

        The y-coordinate of the start point.

      • ex: number

        The x-coordinate of the end point.

      • ey: number

        The y-coordinate of the end point.

      Returns Promise<Int64[]>

      A promise that resolves to an array of picked measurement IDs.

    • Picks face IDs within the specified rubberband rectangle.

      Parameters

      • sx: number

        The x-coordinate of the start point.

      • sy: number

        The y-coordinate of the start point.

      • ex: number

        The x-coordinate of the end point.

      • ey: number

        The y-coordinate of the end point.

      Returns Promise<Int64[]>

      A promise that resolves to an array of picked face IDs.

    • Picks the normal vector at the specified coordinates.

      Parameters

      • x: number

        The x-coordinate.

      • y: number

        The y-coordinate.

      Returns Promise<Vector3D>

      A promise that resolves to the normal vector.

    • Picks the face ID at the specified coordinates.

      Parameters

      • x: number

        The x-coordinate.

      • y: number

        The y-coordinate.

      • prefer2DPaperFace: boolean

        Whether to prefer 2D paper face.

      Returns Promise<Int64>

      A promise that resolves to the picked face ID.

    • Gets the elements selection mode.

      Returns Promise<BIM_ELEMENT_SELECTION_MODE>

      A promise that resolves to the elements selection mode.

    • Picks face IDs within the specified rectangle.

      Parameters

      • x: number

        The x-coordinate of the top-left corner of the rectangle.

      • y: number

        The y-coordinate of the top-left corner of the rectangle.

      • w: number

        The width of the rectangle.

      • h: number

        The height of the rectangle.

      • prefer2DPaperFace: boolean

        Whether to prefer 2D paper face.

      Returns Promise<Int64[]>

      A promise that resolves to an array of picked face IDs.

    • Gets the paper ID of an element ID.

      Parameters

      • rendererId: Int64

        The renderer ID of the element.

      Returns Promise<Int64>

      A promise that resolves to the paper ID.

    • Sets whether the selection label is enabled.

      Parameters

      • val: boolean

        Whether to enable the selection label.

      Returns void

    • Updates the selection label.

      Returns Promise<void>

    • Updates the selection from the highlight.

      Returns Promise<void>

    • Updates the selection by internal IDs.

      Parameters

      • ids: Int64[]

        The internal IDs to update the selection with.

      • highlight: boolean = true

        Whether to highlight the selection.

      Returns Promise<void>

    • Manually update the selection.

      Parameters

      • localElementNodes: BimCTExpandableLevelVirtualRow[]

        The local element nodes to update the selection with.

      • internalIdsToSelection: boolean = true

        Whether to use internal IDs for selection.

      Returns Promise<void>

    • Updates the selection by element IDs.

      Parameters

      • ids: (number | Int64)[]

        The element IDs to update the selection with.

      Returns Promise<void>

    • Updates the selection by global IDs.

      Parameters

      • ids: string[]

        The global IDs to update the selection with.

      Returns Promise<void>

    • Shows all elements.

      Parameters

      • show3D: boolean = true

        Whether to show 3D elements.

      • show2D: boolean = true

        Whether to show 2D elements.

      Returns Promise<void>

    • Gets the highlighted internal IDs. May include Split Internal IDs that are not directly mappable to elements.

      Returns Promise<Int64[]>

      A promise that resolves to an array of highlighted internal IDs.

    • Resets the hybrid mode.

      Parameters

      • clearHighlights: boolean = true

        Whether to clear the highlights.

      Returns Promise<void>

    • Sets elements to hybrid opaque state.

      Parameters

      • internalIds: Int64[]

        The internal IDs of the elements.

      • state: boolean

        The hybrid opaque state.

      • clearHighlights: boolean = true

        Whether to clear the highlights.

      Returns Promise<void>

    • Colorizes elements by internal IDs.

      Parameters

      • internalIds: Int64[]

        The internal IDs of the elements.

      • red: number

        The red component of the color.

      • green: number

        The green component of the color.

      • blue: number

        The blue component of the color.

      • dehighlightAfter: boolean = true

        Whether to dehighlight after colorizing.

      Returns Promise<void>

    • Decolorizes elements by internal IDs.

      Parameters

      • internalIds: Int64[]

        The internal IDs of the elements.

      Returns Promise<void>

    • Colorizes the selected elements.

      Parameters

      • red: number

        The red component of the color.

      • green: number

        The green component of the color.

      • blue: number

        The blue component of the color.

      Returns Promise<void>

    • Decolorizes the selected elements.

      Parameters

      • ensureIsShown: boolean = true

        Whether to ensure the decolorized elements are shown (sets shading mode to solid colors if needed).

      Returns Promise<void>

    • Decolorizes all elements.

      Parameters

      • ensureIsShown: boolean = true

        Whether to ensure the decolorized elements are shown (sets shading mode to solid colors if needed).

      Returns Promise<void>

    • Gets the visible internal IDs.

      Parameters

      • staticElements: boolean

        Whether to include static elements.

      • dynamicElements: boolean

        Whether to include dynamic elements.

      Returns Promise<Int64[]>

      A promise that resolves to an array of visible internal IDs.

    • Selects and highlights all elements on the scene.

      Returns Promise<void>

    • Selects and highlights the elements by element ID.

      Parameters

      • ids: Int64[]

        The element IDs as defined on the metadata file.

      Returns Promise<void>

    • Selects and highlights the elements by engine internal IDs.

      Parameters

      • ids: Int64[]

        The internal IDs (different on every scene loading).

      Returns Promise<void>

    • Selects and highlights the elements using an ElementInfo structure.

      Parameters

      • elements: ElementInfo[]

        The elements to select and highlight.

      Returns void

    • Selects and highlights visible elements on the scene according to static or dynamic type.

      Parameters

      • staticElements: boolean = true

        Whether to include static elements.

      • dynamicElements: boolean = true

        Whether to include dynamic elements.

      • hybridOpaque: boolean = false

        Whether to return only hybrid opaque elements.

      Returns Promise<boolean>

      A promise that resolves to a boolean indicating success or failure.

    • Selects and highlights the elements on the scene according to model name.

      Parameters

      • modelName: string

        The name of the model.

      Returns Promise<boolean>

      A promise that resolves to a boolean indicating success or failure.

    • Selects and highlights the elements on the scene according to the class name. Names for all file types are similar to Ifc Standard without the Ifc prefix.

      Parameters

      • className: string

        The class name.

      Returns Promise<boolean>

      A promise that resolves to a boolean indicating success or failure.

    • Selects and highlights the elements on the scene according to the layer name defined in the file.

      Parameters

      • layerName: string

        The layer name.

      Returns Promise<boolean>

      A promise that resolves to a boolean indicating success or failure.

    • Selects and highlights the elements on the scene according to the material name defined in the file.

      Parameters

      • materialName: string

        The material name.

      Returns Promise<boolean>

      A promise that resolves to a boolean indicating success or failure.

    • Selects and highlights the elements on the scene according to the type defined in the file. Note: For Revit, this is usually the family name.

      Parameters

      • typeName: string

        The type name.

      Returns Promise<boolean>

      A promise that resolves to a boolean indicating success or failure.

    • Selects and highlights the elements on the scene according to the storey defined in the file.

      Parameters

      • storeyName: string

        The storey name.

      Returns Promise<boolean>

      A promise that resolves to a boolean indicating success or failure.

    • Selects and highlights the elements on the scene according to the membership defined in the file.

      Parameters

      • membershipNameOrGlobalId: string

        The membership name or global ID.

      Returns Promise<boolean>

      A promise that resolves to a boolean indicating success or failure.

    • Selects and highlights the elements on the scene according to filters.

      Parameters

      Returns Promise<boolean>

      A promise that resolves to a boolean indicating success or failure.

    • Selects and highlights the elements sharing the same property.

      Parameters

      • property: ElementProperty

        The property to filter by.

      • group: string = null

        The group of the property.

      Returns Promise<boolean>

      A promise that resolves to a boolean indicating success or failure.

    • Hides the selected elements.

      Returns Promise<void>

    • Hides elements by global ID.

      Parameters

      • ids: string[]

        The global IDs of the elements to hide.

      Returns Promise<void>

    • Hides elements by internal ID.

      Parameters

      • ids: Int64[]

        The internal IDs of the elements to hide.

      • recomputeSnapping: boolean = true

        Whether to recompute snapping points.

      Returns Promise<void>

    • Hides elements by element ID.

      Parameters

      • ids: (number | Int64)[]

        The element IDs of the elements to hide.

      • recomputeSnapping: boolean = true

        Whether to recompute snapping points.

      Returns Promise<void>

    • Shows elements by global ID.

      Parameters

      • ids: string[]

        The global IDs of the elements to show.

      Returns Promise<void>

    • Shows elements by element ID.

      Parameters

      • ids: (number | Int64)[]

        The element IDs of the elements to show.

      Returns Promise<void>

    • Isolates the selected elements.

      Returns Promise<void>

    • Isolates the specified elements by their internal IDs.

      Parameters

      • internalIds: Int64[]

        The internal IDs of the elements to isolate.

      Returns Promise<void>

    • Sets the visibility of elements by internal IDs.

      Parameters

      • internalIds: Int64[]

        The internal IDs of the elements.

      • visible: boolean

        Whether to set the elements visible or not.

      • dispatchEvent: boolean = true
      • recomputeSnapping: boolean = true

      Returns Promise<void>

    • Checks if an element is visible.

      Parameters

      • internalId: Int64

        The internal ID of the element.

      Returns Promise<boolean>

      A promise that resolves to a boolean indicating if the element is visible.

    • Sets the key for the renderer.

      Parameters

      • key: string

        The key to set.

      Returns Promise<void>

    • Zooms to elements by global IDs.

      Parameters

      • ids: string[]

        The global IDs of the elements.

      Returns Promise<void>

    • Zooms to elements by element IDs.

      Parameters

      • ids: (number | Int64)[]

        The element IDs of the elements.

      Returns Promise<void>

    • Zooms to the selected elements.

      Returns Promise<boolean>

      A promise that resolves to a boolean indicating success or failure.

    • Zooms to the selection.

      Returns Promise<boolean>

      A promise that resolves to a boolean indicating success or failure.

    • Looks at the specified bounding box.

      Parameters

      • bBox: BoundingBox3D

        The bounding box to look at.

      • animate: boolean

        Whether to animate the transition.

      Returns Promise<boolean>

      A promise that resolves to a boolean indicating success or failure.

    • Resets the camera to the home position.

      Returns Promise<void>

    • Checks if the game mode is on.

      Returns boolean

      Whether the game mode is on.

    • Sets the camera type.

      Parameters

      • type: BIM_CAMERA_TYPE

        The camera type to set.

      • panPrefered: boolean = false

        Whether panning is preferred.

      • dispatchStateChanged: boolean = true

      Returns Promise<void>

    • Sets the selection type.

      Parameters

      • type: BIM_SELECTION_TYPE

        The selection type to set.

      • sendStateChange: boolean = true

        Whether to send the state change event.

      Returns Promise<void>

    • Gets the selection type.

      Returns BIM_SELECTION_TYPE

      The selection type.

    • Resets the 3D camera to the specified position.

      Parameters

      • position: BIM_CAMERA_POSITION

        The position to reset the camera to.

      • animate: boolean

        Whether to animate the transition.

      Returns Promise<void>

    • Starts isometric measurement.

      Parameters

      • negative: boolean

        Whether the measurement is negative.

      Returns Promise<void>

    • Starts auto count measurement.

      Returns Promise<void>

    • Get the Measurement Options that are used while creating measurements.

      Returns MeasurementsOptions

      measurementOptions

    • Clears the Measurement Options that are used while creating measurements. The default options will be used

      Returns void

    • Adds a new measurement.

      Returns Promise<Measurement>

      A promise that resolves to the new measurement.

    • Clears the measurements.

      Returns Promise<void>

    • Clears the pins.

      Returns Promise<void>

    • Focuses the renderer.

      Returns void

    • Refreshes the cutting plane label.

      Parameters

      • planeIndex: number

        The index of the cutting plane.

      Returns void

    • Clears the cutting planes.

      Returns Promise<void>

    • Activates an arbitrary cutting plane.

      Parameters

      • point3D: Vector3D

        The point of the cutting plane.

      • direction: Vector3D

        The direction of the cutting plane.

      • showGizmo: boolean = false

        Whether to show the gismo.

      Returns Promise<boolean>

      A promise that resolves to a boolean indicating success or failure.

    • Activates a cutting plane on a face ID.

      Parameters

      • faceId: Int64

        The face ID.

      • Optionalpoint3D: Vector3D

        The point of the cutting plane.

      Returns Promise<boolean>

      A promise that resolves to a boolean indicating success or failure.

    • Activates a cutting plane.

      Parameters

      • index: number

        The index of the cutting plane.

      Returns Promise<void>

    • Deactivates a cutting plane.

      Parameters

      • index: number

        The index of the cutting plane.

      Returns Promise<void>

    • Checks if a cutting plane is enabled.

      Returns boolean

      Whether a cutting plane is enabled.

    • Checks if a cutting plane is active.

      Parameters

      • index: number

        The index of the cutting plane.

      Returns boolean

      Whether the cutting plane is active.

    • Gets the image data.

      Parameters

      • upsideDown: boolean = true

        Whether to flip the image upside down.

      Returns Promise<Uint8Array<ArrayBufferLike>>

      A promise that resolves to the image data.

    • Gets the gzipped image data.

      Returns Promise<Uint8Array<ArrayBufferLike>>

      A promise that resolves to the gzipped image data.

    • Checks if the renderer is initialized.

      Returns boolean

      Whether the renderer is initialized.

    • Unloads all models in the scene.

      Returns Promise<void>

    • Refreshes the camera cube.

      Returns Promise<void>

    • Sets the camera cube visible or not.

      Parameters

      • visible: boolean

        Whether to set the camera cube visible or not.

      Returns Promise<void>

    • Checks if the camera cube is visible.

      Returns boolean

      Whether the camera cube is visible.

    • Sets the camera compass visible or not.

      Parameters

      • visible: boolean

        Whether to set the camera compass visible or not.

      Returns Promise<void>

    • Checks if the camera compass is visible.

      Returns boolean

      Whether the camera compass is visible.

    • Zooms to elements by internal IDs.

      Parameters

      • internalIds: Int64[]

        The internal IDs of the elements.

      • animate: boolean = true

        Whether to animate the transition.

      Returns Promise<boolean>

      A promise that resolves to a boolean indicating success or failure.

    • Zooms to the extents of the scene, 2D mode only

      Returns Promise<void>

      A promise that resolves to a boolean indicating success or failure.

    • Checks if elements are showing.

      Parameters

      • internalIds: Int64[]

        The internal IDs of the elements.

      Returns Promise<boolean>

      A promise that resolves to a boolean indicating if the elements are showing.

    • Takes a snapshot image and maintains aspect ratio.

      Parameters

      • Optionalwidth: number

        The requested width.

      • Optionalheight: number

        The requested height.

      Returns Promise<string>

      A promise that resolves to a URI that contains the image to download or use.

    • Takes a snapshot image and gets the URL to access it

      Parameters

      • Optionalwidth: number

        The requested width.

      • Optionalheight: number

        The requested height.

      Returns Promise<string>

      A promise that resolves to a URI that contains the image to download or use.

    • Retrieves the current state of dynamic elements.

      Returns Promise<DynamicElementsState>

      A promise that resolves to a DynamicElementsState object.

    • Sets the state of dynamic elements.

      Parameters

      Returns Promise<void>

    • Gets the state of clipping regions.

      Returns Promise<RegionsClippingState>

      A promise that resolves to a ClippingRegionsState object.

    • Sets the state of clipping regions.

      Parameters

      Returns Promise<void>

    • Gets the state of the camera. The state number array includes:

      1. position (3 floats)
      2. target (3 floats)
      3. direction (3 floats)
      4. right (3 floats)
      5. up (3 floats)
      6. linear speed (1 float)
      7. angular speed (1 float)
      8. zoom speed (1 float)
      9. min blend zoom (1 float)
      10. max blend zoom (1 float)

      Returns Promise<CameraState>

      A promise that resolves to a CameraState object.

    • Sets the state of the camera. The state number array includes:

      1. position (3 floats)
      2. target (3 floats)
      3. direction (3 floats)
      4. right (3 floats)
      5. up (3 floats)
      6. linear speed (1 float)
      7. angular speed (1 float)
      8. zoom speed (1 float)
      9. min blend zoom (1 float)
      10. max blend zoom (1 float)

      Parameters

      • state: CameraState

        The state to set.

      • animate: boolean

        Whether to animate the transition (will not animate if minimap is showing)

      • dispatchStateChanged: boolean = true

        Whether to dispatch the state changed event default is true

      Returns Promise<void>

    • Gets the visibility state.

      Returns Promise<VisibilityState>

      A promise that resolves to a VisibilityState object.

    • Sets the visibility state.

      Parameters

      • state: VisibilityState

        The state to set.

      • recomputeSnapping: boolean = true

        Whether to recompute snapping points.

      Returns Promise<void>

    • Gets the colorization state.

      Parameters

      • OptionalfilterIds: Set<bigint>

      Returns Promise<ColorizationState>

      A promise that resolves to a ColorizationState object.

    • Gets the markup state.

      Returns Promise<MarkupState>

      A promise that resolves to a MarkupState object.

    • Sets the markup state.

      Parameters

      • state: MarkupState

        The state to set.

      • editMode: boolean = false

        Whether to enable edit mode.

      Returns Promise<void>

    • Gets the sensors state.

      Returns Promise<SensorsState>

      A promise that resolves to a SensorsState object.

    • Sets the sensors state.

      Parameters

      • state: SensorsState

        The state to set.

      Returns Promise<void>

    • Gets the pin state.

      Returns Promise<PinState>

      A promise that resolves to a PinState object.

    • Sets the pin state.

      Parameters

      Returns Promise<void>

    • Gets the hybrid state.

      Returns Promise<HybridState>

      A promise that resolves to a HybridState object.

    • Sets the hybrid state.

      Parameters

      Returns Promise<void>

    • Sets the colorization state.

      Parameters

      Returns Promise<void>

    • Gets the viewer settings state.

      Parameters

      • includeGeoPositionAndTime: boolean = true

        Whether to include geo position and time.

      Returns Promise<ViewerSettingsState>

      A promise that resolves to a ViewerSettingsState object.

    • Sets the viewer settings state.

      Parameters

      Returns Promise<void>

    • Gets the highlighted state.

      Returns Promise<HighlightedState>

      A promise that resolves to a HighlightedState object.

    • Sets the highlighted state.

      Parameters

      Returns Promise<void>

    • Gets the measurements state.

      Returns Promise<MeasurementState>

      A promise that resolves to a MeasurementState object.

    • Sets the measurements state.

      Parameters

      Returns Promise<void>

    • Gets the cutting planes state.

      Returns Promise<CuttingPlanesState>

      A promise that resolves to a CuttingPlanesState object.

    • Gets the splitted elements state.

      Returns Promise<SplittedElementsState>

    • Sets the splitted elements state.

      Parameters

      • state: SplittedElementsState

        The state to set.

      Returns Promise<void>

    • Sets the cutting planes state.

      Parameters

      Returns Promise<void>

    • Gets the scene view.

      Parameters

      • includeSettingsState: boolean = true

        Whether to include the settings state.

      • OptionalincludePinsState: boolean

        Whether to include the pins state.

      • OptionalincudeSensorsState: boolean

        Whether to include the sensors state.

      • OptionalincludeDynamicElementsState: boolean

        Whether to include the dynamic elements state.

      Returns Promise<SceneView>

      A promise that resolves to a SceneView object.

    • Sets the scene view.

      Parameters

      • view: SceneView

        The scene view to set.

      • transition: boolean

        Whether to transition to the view (will not transition if minimap is showing).

      • markupEditing: boolean = false

        Whether to enable markup editing.

      • showLoadingSplashscreen: boolean = true

        Whether to show the loading splashscreen.

      Returns Promise<void>

    • Checks if the renderer is a mobile renderer.

      Returns boolean

      Whether the renderer is a mobile renderer.

    • Returns any

    • Asynchronously initializes the renderer.

      Parameters

      Returns Promise<void>

    • Remove a model from the renderer

      Parameters

      • modelId: number | Int64
      • dispatchEvent: boolean = true

      Returns Promise<void>

    • Parameters

      • useDistanceCulling: boolean

      Returns Promise<void>

    • Returns Promise<boolean>

    • Parameters

      • coefficient: number

      Returns Promise<void>

    • Returns Promise<number>

    • Parameters

      Returns Promise<BR3D_GetElementsIDsResult>

    • Parameters

      • cutter_id: Int64
      • x: number
      • y: number
      • is_control: boolean

      Returns Promise<BR3D_PushBackMeasurementPointResult>

    • Returns boolean

    • Parameters

      • measurement_id: Int64
      • point_id: number

      Returns Promise<BR3D_IsPointControlPointResult>

    • Parameters

      Returns Promise<void>

    • Parameters

      • data: Uint8Array
      • transformationMatrix: number[]
      • transpose: boolean

      Returns Promise<Uint8Array<ArrayBufferLike>>

    • Parameters

      • fillPaternName: string
      • rendererID: number

      Returns Promise<void>

    • Parameters

      • fillPatern: number
      • fillPaternName: string

      Returns Promise<void>

    • Parameters

      • r: number
      • g: number
      • b: number
      • a: number

      Returns Promise<void>

    • Parameters

      • r: number
      • g: number
      • b: number
      • a: number

      Returns Promise<void>

    • Parameters

      • dir: number

      Returns Promise<void>

    • Parameters

      • distance: number

      Returns Promise<void>

    • Parameters

      • length: number

      Returns Promise<void>

    • Parameters

      • thickness: number

      Returns Promise<void>

    • Parameters

      • rise: number
      • run: number

      Returns Promise<void>

    • Returns Promise<void>

    • Returns Promise<void>

    • Parameters

      • allowBulkModelVertices: boolean

      Returns Promise<void>

    • Parameters

      Returns Promise<void>

    • Returns Promise<void>

    • Starts the drawing loop.

      Returns Promise<void>

    • Refreshes the redraw needed state.

      Parameters

      • reloadColors: boolean = false

      Returns void

    • Asynchronously cleans up and releases resources used by the viewer. This may include removing event listeners, freeing memory, and terminating ongoing processes or operations.

      It is important to ensure that this method is called when the object is no longer needed to prevent memory leaks and ensure optimal application performance.

      Returns Promise<void>

      A promise that resolves when the destruction process is complete, indicating that all resources have been released successfully.

    • Sets the RENDERER_PICK_MODE of the viewer

      Parameters

      Returns Promise<void>

    • Resets the last redraw executed time.

      Returns void

    • Requests the user to select a line and measures its length.

      This method focuses the renderer, locks GUI actions, and sets up the input state for rubberband selection. It displays an optional notification, waits for the user to select a line, and then restores the previous state.

      Parameters

      • OptionalinfoText: string

        Optional informational text to display as a notification during the selection process.

      Returns Promise<number>

      A promise that resolves to the length of the selected line.

    • Requests a scale measurement from the user.

      Parameters

      • OptionalinfoText: string

        Optional informational text to display as a notification during the selection process.

      Returns Promise<CustomScale>

      The length of the selected line, or -1 if the selection was canceled.

    • Returns boolean

    • Returns boolean

    • Parameters

      Returns Promise<boolean>

    • Disables any GUI actions and forces the user to select a Rubberband area on screen Pressing Escape will return null

      Parameters

      • OptionalinfoText: string

        The text to display in the notification or leave empty to avoid showing a notification.

      Returns Promise<Rectangle>

      A promise that resolves to the selection Rectangle or null if the operation fails.

    • Adds a new custom scale by allowing the user to define it interactively.

      Returns Promise<CustomScale>

    • Cancels the custom scale selection process to terminate the waiting for a custom scale in addCustomScale.

      Returns boolean

      True if the custom scale selection was cancelled, false otherwise.

    • Adds a new clipping region by allowing the user to define it interactively.

      Returns Promise<ClippingRegion>

      A promise that resolves to the created BimCTClippingRegion or null if the operation fails.

    • Removes a specified clipping region from the list of regions.

      Parameters

      • region: ClippingRegion

        The BimCTClippingRegion object to be removed.

      • silent: boolean = false

        If true, will not ask the user to delete any measurements that overlap with this region.

      Returns Promise<boolean>

      A promise that resolves to true if the region was successfully removed, or false if the region was not found.

    • Puts the renderer into Pin Addition mode, using inner pin SVG images that can change color You need to subscribe to pinInsertEvent to listen to when and if an image will be actually added

      Parameters

      Returns Promise<void>

    • Puts the renderer into Pin Addition mode, the image used is in the image URL Original Width and Height of the image is required You need to subscribe to pinInsertEvent to listen to when and if an image will be actually added

      Parameters

      Returns Promise<void>

    • Returns Promise<void>

    • Pust the renderer in Length Measurement Pick Mode and starts addition of a Length Measurement You need to subscribe to measurementsPointPushBackEvent to Listen to measurement point changes

      Parameters

      • negative: boolean

        whether it is positive or negative Length Measurement

      Returns Promise<void>

    • Pust the renderer in Area Measurement Pick Mode and starts addition of a Length Measurement You need to subscribe to measurementsPointPushBackEvent to Listen to measurement point changes

      Parameters

      • negative: boolean

        whether it is positive or negative Length Measurement

      Returns Promise<void>

    • Puts the renderer in Count Measurement Pick Mode and starts addition of a Length Measurement You need to subscribe to measurementsPointPushBackEvent to Listen to measurement point changes

      Returns Promise<void>

    • Loads data from a MsgPack payload.

      Parameters

      • payload: number[] | Uint8Array<ArrayBufferLike> | Buffer<ArrayBufferLike>

        The payload to load.

      • OptionalsceneView: SceneView

        The scene view to use for the model or undefined to use the default scene view. if you dont want to change the camera or the view use autoCameraResetAfterModelLoaded = true prior to calling this function.

      • Optionaltransition: boolean

        Whether to animate the transition to the new model.

      Returns Promise<void>

      A promise that resolves when the model is loaded.

    • Loads a model from a URL and caches it in the browser.

      Parameters

      • url: string

        The URL to load the model from.

      • OptionalsceneView: SceneView

        The scene view to use for the model or undefined to use the default scene view. if you dont want to change the camera or the view use autoCameraResetAfterModelLoaded = true prior to calling this function.

      • Optionaltransition: boolean

        Whether to animate the transition to the new model.

      • Optionalmatrix: number[]

        The matrix to apply to the model.

      • Optionalmapping: ModelIdMapping

        The mapping to apply to the model.

      Returns Promise<void>

      A promise that resolves when the model is loaded.

    • Loads a model from an XMLHttpRequest and caches it in the browser.

      Parameters

      • httpRequest: XMLHttpRequest

        The XMLHttpRequest to load the model from.

      • uuid: string

        The UUID of the model.

      • OptionalsceneView: SceneView

        The scene view to use for the model or undefined to use the default scene view. if you dont want to change the camera or the view use autoCameraResetAfterModelLoaded = true prior to calling this function.

      • Optionaltransition: boolean

        Whether to animate the transition to the new model.

      • Optionalmatrix: number[]

        The matrix to apply to the model.

      • Optionalmapping: ModelIdMapping

        The mapping to apply to the model.

      Returns Promise<void>

      A promise that resolves when the model is loaded.

    • Gets the models with URL state.

      Parameters

      • modelIds: Int64[]

        The model IDs to get the state for.

      Returns Promise<ModelsWithURLState>

    • Sets the models with URL state.

      Parameters

      • state: ModelsWithURLState

        The state to set.

      • unloadAllModelsWithURL: boolean = false

        Whether to unload all models with URL before setting the state.

      Returns Promise<void>

      A promise that resolves when the state is set.

    • Loads a model from a URL.

      Parameters

      • url: string

        The URL of the model to load.

      • OptionalsceneView: SceneView

        The scene view to use for the model or undefined to use the default scene view. if you dont want to change the camera or the view use autoCameraResetAfterModelLoaded = true prior to calling this function.

      • Optionaltransition: boolean

        Whether to use a transition when loading the model.

      • Optionalmatrix: number[]

        The matrix to apply to the model.

      • Optionalmapping: ModelIdMapping

        The mapping to apply to the model.

      Returns Promise<ModelInfo>

      A promise that resolves to the ModelInfo object of the loaded model.

    • Clones a model that was already loaded to the scene using a URL.

      Parameters

      • modelId: Int64

        The ID of the model to clone.

      • OptionalsceneView: SceneView

        The scene view to use for the model.

      • Optionaltransition: boolean

        Whether to use a transition when loading the model.

      • Optionalmatrix: number[]

        The matrix to apply to the model.

      • Optionalmapping: ModelIdMapping

        The mapping to apply to the model.

      Returns Promise<ModelInfo>

      A promise that resolves to the ModelInfo object of the cloned model.

    • Reloads a model that was already loaded to the scene using a URL. But with the specified matrix.

      Parameters

      • modelId: Int64

        the ID of the model to reload.

      • matrix: number[]

        the matrix to apply to the model.

      Returns Promise<void>

    • Loads a model from a payload.

      Parameters

      • payload: number[] | Blob | Uint8Array<ArrayBufferLike> | XMLHttpRequest

        The payload of the model to load.

      • OptionalsceneView: SceneView

        The scene view to use for the model or undefined to use the default scene view. if you dont want to change the camera or the view use autoCameraResetAfterModelLoaded = true prior to calling this function.

      • Optionaltransition: boolean

        Whether to use a transition when loading the model.

      • Optionalmatrix: number[]

        The matrix to apply to the model.

      • Optionalmapping: ModelIdMapping

        The mapping to apply to the model.

      Returns Promise<ModelInfo>

      A promise that resolves to the ModelInfo object of the loaded model.

    • Stops the rendering animation loop and waits for the current frame to finish rendering. This is useful when you want to stop rendering and wait for the current frame to finish rendering before doing something else.

      Returns void

    • Starts the rendering animation loop. This is useful when you want to start rendering after stopping it.

      Returns Promise<void>

    • Returns whether the rendering is stopped.

      Returns boolean

    • Checks if VR is supported.

      Returns Promise<boolean>

    • Checks if a VR session is started.

      Returns boolean

    • Stops the VR session.

      Returns Promise<boolean>

    • Sets the XR preview to canvas state.

      Parameters

      • preview: boolean

      Returns void

    • Resets the XR visibility state.

      Returns Promise<void>

    • Starts the VR session.

      Parameters

      • previewToCanvas: boolean = false

      Returns Promise<boolean>

    • Adds a comparison renderer.

      Parameters

      Returns void

    • Removes a comparison renderer.

      Parameters

      Returns void

    • Returns boolean

      whether the renderer is comparing.

    • Locks or unlocks GUI actions.

      Parameters

      • locked: boolean

        Whether to lock or unlock GUI actions.

      • escapeCallback: () => void = undefined

      Returns void