Methods
adjustOrbit
adjustOrbit(deltaTheta: number, deltaPhi: number, deltaZoom: number): void
Used to adjust the current controler’s target camera spherical coordinates by providing deltas.
Parameters
- deltaTheta: The adjustment for the theta angle
- deltaPhi: The adjustment for the phi angle
- deltaZoom: The adjustment to the radius
Returns: void
setDamperDecayTime
setDamperDecayTime(decayMilliseconds: number)
Sets the dampening values for the control. A larger smoothens out the camera’s movement
Parameters
- decayMilliseconds: Decay value
Returns: void
setFieldOfView
setFieldOfView(fov: number)
Sets the field of view when camera is PerspectiveCamera
Parameters
Returns: void
setOrbit
setOrbit(
goalTheta?: number,
goalPhi?: number,
goalRadius?: number
): boolean
Set the absolute orbital goal of the camera. The change will be applied over a number of frames depending on configured dampening value.
Returns true if invoking the method will result in the camera changing position and/or rotation, otherwise false.
Parameters
- goalTheta: Goal theta angle
- goalPhi: Goal phi angle
- goalRadius: Goal radius value
Returns: boolean
setRadius
setRadius(radius: number): void
Sets the radius value
Returns: void
setTarget
setTarget(x: number, y: number, z: number): void
Sets the origin of the spherical coordinate system
Returns: void
Typedefs
SmoothOrbitControlsOptions
export interface SmoothOrbitControlsOptions {
enableOrbit?: boolean;
enableZoom?: boolean;
enablePan?: boolean;
orbitSensitivity?: number;
zoomSensitivity?: number;
panSensitivity?: number;
inputSensitivity?: number;
minimumRadius?: number;
maximumRadius?: number;
minimumPolarAngle?: number;
maximumPolarAngle?: number;
minimumAzimuthalAngle?: number;
maximumAzimuthalAngle?: number;
infiniteZoom?: boolean;
zoomToCursor?: boolean;
damperDecay?: number;
orbitAroundCursor?: boolean;
showOrbitPoint?: boolean;
}
The available options:
- optional enableOrbit: Enables orbiting
- optional enableZoom: Enables zooming
- optional enablePan: Enables panning
- optional orbitSensitivity: Sensitivity of rotating
- optional zoomSensitivity: Sensitivity of zooming
- optional panSensitivity: Sensitivity of panning
- optional inputSensitivity: General Sensitivity
- optional minimumRadius: The closest the camera can be to the target
- optional maximumRadius: The farthest the camera can be from the target
- optional minimumPolarAngle: The minimum angle between model-up and the camera polar position
- optional maximumPolarAngle: The maximum angle between model-up and the camera polar position
- optional minimumAzimuthalAngle: The minimum angle between model-forward and the camera azimuthal position
- optional infiniteZoom: Enables infinite zoom
- optional zoomToCursor: Enables scrolling to cursor
- optional damperDecay: The dampening value for the controller
- optional orbitAroundCursor: Enables rotating around cursor
- optional showOrbitPoint: Enables the display of the orbit’s anchor point
Last modified on January 28, 2026