Skip to main content
Version: Next

Interface: Cognite3DViewerOptions

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

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:117

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:82

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:177

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:168

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:51

An existing DOM element that we will render canvas into.


enableEdges?

optional enableEdges: boolean

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

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


hasEventListeners?

optional hasEventListeners: boolean

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

Beta

Add event listeners around, default is having event listeners.


loadingIndicatorStyle?

optional loadingIndicatorStyle: object

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

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:54

Send anonymous usage statistics.


onLoading?

optional onLoading: OnLoadingCallback

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

Callback to download stream progress.


pointCloudEffects?

optional pointCloudEffects: object

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

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:88

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:99

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:59

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:48

Initialized connection to CDF used to load data.


ssaoQualityHint?

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

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

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:199

Beta

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