Skip to main content
Version: Next

Interface: Cognite3DViewerOptions

Defined in: packages/api/src/public/migration/types.ts:73

Properties

antiAliasingHint?

optional antiAliasingHint?: "disabled" | "fxaa" | "msaa2+fxaa" | "msaa4+fxaa" | "msaa8+fxaa" | "msaa16+fxaa" | "msaa2" | "msaa4" | "msaa8" | "msaa16"

Defined in: packages/api/src/public/migration/types.ts:144

Hints Reveal to use a given anti-aliasing technique.

Fast approximate anti-aliasing (FXAA) is a fast technique that will remove some, but not all aliasing effects. See https://en.wikipedia.org/wiki/Fast_approximate_anti-aliasing.

Multi-sampling anti-aliasinbg (MSAA) is a technique for taking multiple samples per pixel to avoid aliasing effects. This mode requires WebGL 2. See https://www.khronos.org/opengl/wiki/Multisampling.

The combined modes will apply both MSAA and FXAA anti-aliasing and yields the best visual result.

When using the MSAA modes combined with FXAA Reveal will fall back to FXAA on WebGL 1. There is no fallback for the "plain" MSAA modes on WebGL 1.

Currently the default mode is FXAA, but this is subject to change.


cameraManager?

optional cameraManager?: CameraManager

Defined in: packages/api/src/public/migration/types.ts:109

Camera manager instance that is used for controlling the camera. It is responsible for all manipulations that are done with the camera, including animations and modification of state. Also, gives ability to provide custom PerspectiveCamera instance to Cognite3DViewer. Default implementation is DefaultCameraManager.


continuousModelStreaming?

optional continuousModelStreaming?: boolean

Defined in: packages/api/src/public/migration/types.ts:204

Allows for controlling if geometry streaming should be halted when the camera is moving. Note that this option should left to false on low-end devices as more loading can cause frame drops.

Default value is set to true.


customDataSource?

optional customDataSource?: DataSource

Defined in: packages/api/src/public/migration/types.ts:195

Allows providing a custom data source that Reveal will use to load model data. Note that some features might not work when implementing a custom data source. Please refer to the Reveal documentation for details.

Note that the data source must support CdfModelIdentifier.

This cannot be used together with Cognite3DViewerOptions._localModels.


domElement?

optional domElement?: HTMLElement

Defined in: packages/api/src/public/migration/types.ts:78

An existing DOM element that we will render canvas into.


enableEdges?

optional enableEdges?: boolean

Defined in: packages/api/src/public/migration/types.ts:180

Enables / disables visualizing the edges of geometry. Defaults to true.


enableFloorIcons?

optional enableFloorIcons?: boolean

Defined in: packages/api/src/public/migration/types.ts:255

Show floor disc icons for nearby 360 images when the user is inside a 360 image.

Default

false

enableHtmlClusters?

optional enableHtmlClusters?: boolean

Defined in: packages/api/src/public/migration/types.ts:240

Enable HTML-based cluster rendering for 360 image icons. When enabled, nearby icons are grouped into cluster badges that show a count. Configure appearance and thresholds via htmlClusterOptions.

Default

false

hasEventListeners?

optional hasEventListeners?: boolean

Defined in: packages/api/src/public/migration/types.ts:232

Beta

Add event listeners around, default is having event listeners.


htmlClusterOptions?

optional htmlClusterOptions?: HtmlClusterOptions

Defined in: packages/api/src/public/migration/types.ts:249

Fine-grained options for HTML cluster rendering. Only applies when enableHtmlClusters is true. Controls the 3D clustering distance, occlusion fade range, and advanced DOM rendering settings. See HtmlClusterOptions.


loadingIndicatorStyle?

optional loadingIndicatorStyle?: object

Defined in: packages/api/src/public/migration/types.ts:91

Style the loading indicator.

opacity

opacity: number

Opacity of the spinner in fractions. Valid values are between 0.2 and 1.0. Defaults to 1.0.

placement

placement: "topLeft" | "topRight" | "bottomLeft" | "bottomRight"

What corner the spinner should be placed in. Defaults top topLeft.


logMetrics?

optional logMetrics?: boolean

Defined in: packages/api/src/public/migration/types.ts:81

Send anonymous usage statistics.


onLoading?

optional onLoading?: OnLoadingCallback

Defined in: packages/api/src/public/migration/types.ts:183

Callback to download stream progress.


pointCloudEffects?

optional pointCloudEffects?: object

Defined in: packages/api/src/public/migration/types.ts:165

Point cloud visualisation effects parameteres.

edlOptions?

optional edlOptions?: "disabled" | Partial<EdlOptions>

Eye Dome Lighting (EDL) effect, considerably improves depth perception of point cloud model.

pointBlending?

optional pointBlending?: boolean

Point blending effect, creates more "stable" texture on objects surfaces if point sizing is big enough. Can cause significant decrease in performance on some machines.


renderer?

optional renderer?: WebGLRenderer

Defined in: packages/api/src/public/migration/types.ts:115

Renderer used to visualize model (optional). Note that when providing a custom renderer, this should be configured with 'powerPreference': 'high-performance' for best performance.


rendererResolutionThreshold?

optional rendererResolutionThreshold?: number

Defined in: packages/api/src/public/migration/types.ts:126

Generally Reveal will follow the resolution given by the size of the encapsulating DOM element of the Canvas Cognite3DViewerOptions.domElement. To ensure managable performance, Reveal will by default set an upper threshold to limit the resolution. Setting the Cognite3DViewerOptions.rendererResolutionThreshold will set this upper limit of what resolution Reveal will allow.

Deprecated

Use Cognite3DViewer.setResolutionOptions instead.


renderTargetOptions?

optional renderTargetOptions?: object

Defined in: packages/api/src/public/migration/types.ts:86

Render to offscreen buffer instead of canvas.

autoSetSize?

optional autoSetSize?: boolean

target

target: WebGLRenderTarget


sdk

sdk: CogniteClient

Defined in: packages/api/src/public/migration/types.ts:75

Initialized connection to CDF used to load data.


ssaoQualityHint?

optional ssaoQualityHint?: "disabled" | "medium" | "high" | "veryhigh"

Defined in: packages/api/src/public/migration/types.ts:160

Hints the renderer of the quality it should aim for for screen space ambient occlusion, an effect creating shadows and that gives the rendered image more depth.


useFlexibleCameraManager?

optional useFlexibleCameraManager?: boolean

Defined in: packages/api/src/public/migration/types.ts:226

Beta

Use the new flexible camera manager or not, default not to be used.