> ## Documentation Index
> Fetch the complete documentation index at: https://docs.speckle.systems/llms.txt
> Use this file to discover all available pages before exploring further.

# SmoothOrbitControls

> Orbit camera controls based on Google's model-viewer implementation. Input are the angles and radius of a spherical coordinate system with a configurable origin.

## Methods

### adjustOrbit

```typescript theme={null}
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

```typescript theme={null}
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

```typescript theme={null}
setFieldOfView(fov: number)
```

Sets the field of view when camera is [*PerspectiveCamera*](https://threejs.org/docs/index.html?q=persp#api/en/cameras/PerspectiveCamera)

**Parameters**

* **fov**: Field of view value

**Returns**: void

### setOrbit

```typescript theme={null}
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

```typescript theme={null}
setRadius(radius: number): void
```

Sets the radius value

**Returns**: void

### setTarget

```typescript theme={null}
setTarget(x: number, y: number, z: number): void
```

Sets the origin of the spherical coordinate system

**Returns**: void

## Typedefs

### SmoothOrbitControlsOptions

```typescript theme={null}
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
