Class: DefaultCameraManager
@cognite/reveal.DefaultCameraManager
Default implementation of CameraManager. Uses target-based orbit controls combined with keyboard and mouse navigation possibility. Supports automatic update of camera near and far planes and animated change of camera position and target.
Implements
Properties
automaticControlsSensitivity
• automaticControlsSensitivity: boolean
= true
When false, the sensitivity of the camera controls will not be updated automatically. This can be useful to better control the sensitivity of the 3D navigation.
When not set, control the sensitivity of the camera using viewer.cameraManager.cameraControls.minDistance
and viewer.cameraManager.cameraControls.maxDistance
.
Defined in
packages/camera-manager/src/DefaultCameraManager.ts:85
automaticNearFarPlane
• automaticNearFarPlane: boolean
= true
When false, camera near and far planes will not be updated automatically (defaults to true). This can be useful when you have custom content in the 3D view and need to better control the view frustum.
When automatic camera near/far planes are disabled, you are responsible for setting this on your own.
example
viewer.camera.near = 0.1;
viewer.camera.far = 1000.0;
viewer.camera.updateProjectionMatrix();
Defined in
packages/camera-manager/src/DefaultCameraManager.ts:77
Accessors
cameraControls
• get
cameraControls(): ComboControls
Gets instance of camera controls that are used by camera manager. See ComboControls for more information on all adjustable properties.
deprecated
Will be removed in 4.0.0.
Returns
Defined in
packages/camera-manager/src/DefaultCameraManager.ts:144
cameraControlsEnabled
• get
cameraControlsEnabled(): boolean
Gets whether camera controls through mouse, touch and keyboard are enabled.
deprecated
Will be removed in 4.0.0. Use DefaultCameraManager.enabled instead.
Returns
boolean
Defined in
packages/camera-manager/src/DefaultCameraManager.ts:178
• set
cameraControlsEnabled(enabled
): void
Sets whether camera controls through mouse, touch and keyboard are enabled. This can be useful to e.g. temporarily disable navigation when manipulating other objects in the scene or when implementing a "cinematic" viewer.
deprecated
Will be removed in 4.0.0. Use DefaultCameraManager.enabled instead.
Parameters
Name | Type |
---|---|
enabled | boolean |
Returns
void
Defined in
packages/camera-manager/src/DefaultCameraManager.ts:169
enabled
• get
enabled(): boolean
Gets whether camera controls through mouse, touch and keyboard are enabled.
Returns
boolean
Implementation of
Defined in
packages/camera-manager/src/DefaultCameraManager.ts:159
• set
enabled(enabled
): void
Sets whether camera controls through mouse, touch and keyboard are enabled.