Skip to content

OrbitControls

Defined in: addons/src/controls/OrbitControls.ts:32

Listeners by event type, as the DOM’s EventTarget has them, for any object.

new OrbitControls(camera, domElement): OrbitControls

Defined in: addons/src/controls/OrbitControls.ts:70

Camera

HTMLElement

OrbitControls

EventDispatcher.constructor

dampingFactor: number = 0.92

Defined in: addons/src/controls/OrbitControls.ts:39

The fraction of a coasting turn’s speed lost each second.


enabled: boolean = true

Defined in: addons/src/controls/OrbitControls.ts:35


enableDamping: boolean = true

Defined in: addons/src/controls/OrbitControls.ts:37

A released turn keeps going and slows, as a turntable does.


maxAzimuthAngle: number = Infinity

Defined in: addons/src/controls/OrbitControls.ts:51


maxDistance: number = Infinity

Defined in: addons/src/controls/OrbitControls.ts:45


maxPolarAngle: number

Defined in: addons/src/controls/OrbitControls.ts:48


minAzimuthAngle: number = -Infinity

Defined in: addons/src/controls/OrbitControls.ts:50

The angle about +y, in radians, from +z; unbounded by default.


minDistance: number = 0

Defined in: addons/src/controls/OrbitControls.ts:44


minPolarAngle: number = 0.01

Defined in: addons/src/controls/OrbitControls.ts:47

The angle from straight up, in radians: 0 looks down from above, pi from below.


rotateSpeed: number

Defined in: addons/src/controls/OrbitControls.ts:41

Radians of turn for a drag across the element’s height.


readonly target: Vector3

Defined in: addons/src/controls/OrbitControls.ts:34

What the camera turns about and looks at.


targetBounds: Box3

Defined in: addons/src/controls/OrbitControls.ts:53

The box the target stays in when panning.


zoomSpeed: number = 0.0015

Defined in: addons/src/controls/OrbitControls.ts:43

The dolly factor per wheel pixel, as an exponent.

get moving(): boolean

Defined in: addons/src/controls/OrbitControls.ts:91

Whether the view is changing: a pointer is down, the turn coasts, or a wheel just turned.

boolean

addEventListener<K>(type, listener): void

Defined in: radiance/src/core/EventDispatcher.ts:5

K extends keyof OrbitControlsEvents

K

(event) => void

void

EventDispatcher.addEventListener


dispatchEvent<K>(type, event): void

Defined in: radiance/src/core/EventDispatcher.ts:15

K extends keyof OrbitControlsEvents

K

OrbitControlsEvents[K]

void

EventDispatcher.dispatchEvent


dispose(): void

Defined in: addons/src/controls/OrbitControls.ts:156

Remove every listener from the element.

void


getDistance(): number

Defined in: addons/src/controls/OrbitControls.ts:101

The distance from the target to the camera.

number


removeEventListener<K>(type, listener): void

Defined in: radiance/src/core/EventDispatcher.ts:11

K extends keyof OrbitControlsEvents

K

(event) => void

void

EventDispatcher.removeEventListener


reset(): void

Defined in: addons/src/controls/OrbitControls.ts:111

Return to the saved view.

void


saveState(): void

Defined in: addons/src/controls/OrbitControls.ts:106

Remember the camera and target, for reset().

void


update(dt?): boolean

Defined in: addons/src/controls/OrbitControls.ts:125

Advance a coasting turn by dt seconds, place the camera, and answer whether it moved since the last call. A change to target or the camera’s position made by the application is taken in here too.

number = ...

boolean