Class: OrbitControls
Defined in: modules/engine/src/controls/orbit-controls.ts:66
Pointer orbit, optional pinch roll, wheel and pinch zoom, and automatic rotation controls.
Call update once per frame with an animation-loop timestamp in milliseconds before reading getEyePosition. Manual dragging temporarily pauses automatic rotation and resumes it from the new angle when the pointer is released.
Constructors
Constructor
new OrbitControls(
canvas,props?):OrbitControls
Defined in: modules/engine/src/controls/orbit-controls.ts:83
Parameters
canvas
HTMLCanvasElement
props?
OrbitControlsProps = {}
Returns
OrbitControls
Properties
canvas
readonlycanvas:HTMLCanvasElement
Defined in: modules/engine/src/controls/orbit-controls.ts:67
distance
distance:
number
Defined in: modules/engine/src/controls/orbit-controls.ts:72
pitch
pitch:
number
Defined in: modules/engine/src/controls/orbit-controls.ts:70
props
readonlyprops:ResolvedOrbitControlsProps
Defined in: modules/engine/src/controls/orbit-controls.ts:68
roll
roll:
number
Defined in: modules/engine/src/controls/orbit-controls.ts:71
yaw
yaw:
number
Defined in: modules/engine/src/controls/orbit-controls.ts:69
Methods
destroy()
destroy():
void
Defined in: modules/engine/src/controls/orbit-controls.ts:209
Returns
void
getEyePosition()
getEyePosition():
OrbitPosition
Defined in: modules/engine/src/controls/orbit-controls.ts:124
Returns the current camera eye around the configured target.
Returns
getUpDirection()
getUpDirection():
OrbitPosition
Defined in: modules/engine/src/controls/orbit-controls.ts:134
Returns the camera up direction after applying pitch and optional two-finger roll.
Returns
reset()
reset():
void
Defined in: modules/engine/src/controls/orbit-controls.ts:198
Restores the configured starting orbit, roll, and zoom.
Returns
void
setAutoRotate()
setAutoRotate(
autoRotate):void
Defined in: modules/engine/src/controls/orbit-controls.ts:162
Enables or pauses automatic rotation without losing the current manual angle.
Parameters
autoRotate
boolean
Returns
void
setProps()
setProps(
props):void
Defined in: modules/engine/src/controls/orbit-controls.ts:167
Updates orbit configuration and applies supplied camera state immediately.
Parameters
props
Returns
void
update()
update(
timeMilliseconds):void
Defined in: modules/engine/src/controls/orbit-controls.ts:107
Advances optional auto-rotation using an animation-loop timestamp in milliseconds.
Parameters
timeMilliseconds
number
Returns
void