Skip to main content
Version: 3.x

Interface: Cognite3DViewerOptions

@cognite/reveal.Cognite3DViewerOptions

Properties

antiAliasingHint

Optional antiAliasingHint: "disabled" | "fxaa" | "msaa2+fxaa" | "msaa4+fxaa" | "msaa8+fxaa" | "msaa16+fxaa" | "msaa2" | "msaa4" | "msaa8" | "msaa16"

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.

Defined in

packages/api/src/public/migration/types.ts:93


cameraManager

Optional cameraManager: CameraManager

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 THREE.PerspectiveCamera instance to Cognite3DViewer. Default implementation is DefaultCameraManager.

Defined in

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


continuousModelStreaming

Optional continuousModelStreaming: boolean

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 false.

Defined in

packages/api/src/public/migration/types.ts:149


customDataSource

Optional customDataSource: DataSource

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 {@link _localModels}.

Defined in

packages/api/src/public/migration/types.ts:140


domElement

Optional domElement: HTMLElement

An existing DOM element that we will render canvas into.

Defined in

packages/api/src/public/migration/types.ts:33


enableEdges

Optional enableEdges: boolean

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

Defined in

packages/api/src/public/migration/types.ts:125


loadingIndicatorStyle

Optional loadingIndicatorStyle: Object

Style the loading indicator.

Type declaration

NameTypeDescription
opacitynumberOpacity of the spinner in fractions. Valid values are between 0.2 and 1.0. Defaults to 1.0.
placement"topLeft" | "topRight" | "bottomLeft" | "bottomRight"What corner the spinner should be placed in. Defaults top topLeft.

Defined in

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


logMetrics

Optional logMetrics: boolean

Send anonymous usage statistics.

Defined in

packages/api/src/public/migration/types.ts:36


onLoading

Optional onLoading: OnLoadingCallback

Callback to download stream progress.

Defined in

packages/api/src/public/migration/types.ts:128


pointCloudEffects

Optional pointCloudEffects: Object

Point cloud visualisation effects parameteres.

Type declaration

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

Defined in

packages/api/src/public/migration/types.ts:114


renderTargetOptions

Optional renderTargetOptions: Object

Render to offscreen buffer instead of canvas.

Type declaration

NameType
autoSetSize?boolean
targetWebGLRenderTarget

Defined in

packages/api/src/public/migration/types.ts:41


renderer

Optional renderer: WebGLRenderer

Renderer used to visualize model (optional).

Defined in

packages/api/src/public/migration/types.ts:66


rendererResolutionThreshold

Optional rendererResolutionThreshold: number

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.

Defined in

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


sdk

sdk: default

Initialized connection to CDF used to load data.

Defined in

packages/api/src/public/migration/types.ts:30


ssaoQualityHint

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

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.

Defined in

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