Interface CameraControlParams

Configuration options for CameraControl.

interface CameraControlParams {
    active?: boolean;
    constrainVertical?: boolean;
    dollyInertia?: number;
    dollyMinSpeed?: number;
    dollyProximityThreshold?: number;
    doublePickFlyTo?: boolean;
    dragRotationRate?: number;
    followPointer?: boolean;
    keyboardDollyRate?: number;
    keyboardEnabledOnlyOfMouseover?: boolean;
    keyboardPanRate?: number;
    keyboardRotationRate?: number;
    keyMap?: any;
    mouseWheelDollyRate?: number;
    navMode?: number;
    panInertia?: number;
    panRightClick?: boolean;
    rotationInertia?: number;
    touchDollyRate?: number;
    touchPanRate?: number;
}

Properties

active?: boolean

Enables or disables cameracontrol!CameraControl.

Default: true

constrainVertical?: boolean

Constrains the Camera vertically for first-person navigation.

When true, the Camera.eye remains fixed at its current vertical position.

Applies only when CameraControl.navMode is set to FirstPersonNavigationMode.

Default: false

dollyInertia?: number

Amount of inertia applied to dollying, allowing the Camera to continue moving briefly after input stops.

Default: 0

dollyMinSpeed?: number

Minimum dolly speed when using keyboard input for continuous movement.

Default: 0.04 meters per second.

dollyProximityThreshold?: number

Distance threshold where dolly speed decreases when approaching objects and increases when moving away.

Default: 35 meters.

doublePickFlyTo?: boolean

Determines whether double-clicking an object causes the Camera to fly to its boundary.

Default: false

dragRotationRate?: number

Sensitivity of mouse drag for rotating the Camera.

followPointer?: boolean

Enables or disables pointer-based camera control.

  • Orbit mode: Camera orbits around the pointer and dolly moves toward or away from it.
  • Fly-to mode: Camera dollies toward or away from the pointer, but rotation occurs around the camera position.
  • Plan-view mode: Camera dollies toward or away from the pointer without rotation.

Default: true

keyboardDollyRate?: number

Sensitivity of the keyboard for dollying (moving forward and backward) with the Camera.

keyboardEnabledOnlyOfMouseover?: boolean

Enables keyboard shortcuts only when the mouse is over the canvas.

Default: false

keyboardPanRate?: number

Sensitivity of keyboard input for panning the Camera.

keyboardRotationRate?: number

Sensitivity of keyboard input for rotating the Camera.

keyMap?: any

Custom key mappings for cameracontrol!CameraControl actions.

This can be a set of custom key mappings or a predefined keyboard layout name, which applies default mappings for that layout.

mouseWheelDollyRate?: number

Sensitivity of the mouse wheel for dollying (moving forward and backward) with the Camera.

navMode?: number

Specifies the navigation mode.

Accepted values:

panInertia?: number

Amount of inertia applied to panning, allowing the Camera to continue moving briefly after input stops.

Default: 0

panRightClick?: boolean

Enables right-click mouse dragging for horizontal panning with the Camera.

Default: true

rotationInertia?: number

Amount of inertia applied to rotation, allowing the Camera to continue rotating briefly after input stops.

Default: 0

touchDollyRate?: number

Sensitivity of touch controls for dollying (moving forward and backward) with the Camera.

touchPanRate?: number

Sensitivity of touch controls for panning the Camera.