new OrbitControls(scene, camera, userZoomSpeed, userRotateSpeed, autoRotate, autoRotate)
Behaves like THREE.OrbitControls, but uses right-handed coordinates and z as up vector.
Parameters:
| Name | Type | Description |
|---|---|---|
scene |
the global scene to use |
|
camera |
the camera to use |
|
userZoomSpeed |
(optional) - the speed for zooming |
|
userRotateSpeed |
(optional) - the speed for rotating |
|
autoRotate |
(optional) - if the orbit should auto rotate |
|
autoRotate |
(optional) - the speed for auto rotating |
- Source:
- visualization/interaction/OrbitControls.js, line 19
Methods
-
rotateDown(angle)
-
Rotate the camera down by the given angle.
Parameters:
Name Type Description angle(optional) - the angle to rotate by
- Source:
- visualization/interaction/OrbitControls.js, line 418
-
rotateLeft(angle)
-
Rotate the camera to the left by the given angle.
Parameters:
Name Type Description angle(optional) - the angle to rotate by
- Source:
- visualization/interaction/OrbitControls.js, line 382
-
rotateRight(angle)
-
Rotate the camera to the right by the given angle.
Parameters:
Name Type Description angle(optional) - the angle to rotate by
- Source:
- visualization/interaction/OrbitControls.js, line 394
-
rotateUp(angle)
-
Rotate the camera up by the given angle.
Parameters:
Name Type Description angle(optional) - the angle to rotate by
- Source:
- visualization/interaction/OrbitControls.js, line 406
-
showAxes()
-
Display the main axes for 1 second.
- Source:
- visualization/interaction/OrbitControls.js, line 360
-
update()
-
Update the camera to the current settings.
- Source:
- visualization/interaction/OrbitControls.js, line 452
-
zoomIn(zoomScale)
-
Zoom in by the given scale.
Parameters:
Name Type Description zoomScale(optional) - the scale to zoom in by
- Source:
- visualization/interaction/OrbitControls.js, line 430
-
zoomOut(zoomScale)
-
Zoom out by the given scale.
Parameters:
Name Type Description zoomScale(optional) - the scale to zoom in by
- Source:
- visualization/interaction/OrbitControls.js, line 442
-
<inner> intersectViewPlane(mouseRay, planeOrigin, planeNormal)
-
Used to track the movement during camera movement.
Parameters:
Name Type Description mouseRaythe mouse ray to intersect with
planeOriginthe origin of the plane
planeNormalthe normal of the plane
- Source:
- visualization/interaction/OrbitControls.js, line 168
Returns:
the intersection
-
<inner> onMouseDown(event3D)
-
Handle the mousedown 3D event.
Parameters:
Name Type Description event3Dthe 3D event to handle
- Source:
- visualization/interaction/OrbitControls.js, line 81
-
<inner> onMouseMove(event3D)
-
Handle the mousemove 3D event.
Parameters:
Name Type Description event3Dthe 3D event to handle
- Source:
- visualization/interaction/OrbitControls.js, line 117
-
<inner> onMouseUp(event3D)
-
Handle the mouseup 3D event.
Parameters:
Name Type Description event3Dthe 3D event to handle
- Source:
- visualization/interaction/OrbitControls.js, line 193
-
<inner> onMouseWheel(event3D)
-
Handle the mousewheel 3D event.
Parameters:
Name Type Description event3Dthe 3D event to handle
- Source:
- visualization/interaction/OrbitControls.js, line 206
-
<inner> onTouchDown(event3D)
-
Handle the touchdown 3D event.
Parameters:
Name Type Description event3Dthe 3D event to handle
- Source:
- visualization/interaction/OrbitControls.js, line 233
-
<inner> onTouchMove(event3D)
-
Handle the touchmove 3D event.
Parameters:
Name Type Description event3Dthe 3D event to handle
- Source:
- visualization/interaction/OrbitControls.js, line 271