Class: OrbitControls

ROS3D.OrbitControls(scene, camera, userZoomSpeed, userRotateSpeed, autoRotate, autoRotate)

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:

Methods

rotateDown(angle)

Rotate the camera down by the given angle.

Parameters:
Name Type Description
angle

(optional) - the angle to rotate by

Source:

rotateLeft(angle)

Rotate the camera to the left by the given angle.

Parameters:
Name Type Description
angle

(optional) - the angle to rotate by

Source:

rotateRight(angle)

Rotate the camera to the right by the given angle.

Parameters:
Name Type Description
angle

(optional) - the angle to rotate by

Source:

rotateUp(angle)

Rotate the camera up by the given angle.

Parameters:
Name Type Description
angle

(optional) - the angle to rotate by

Source:

showAxes()

Display the main axes for 1 second.

Source:

update()

Update the camera to the current settings.

Source:

zoomIn(zoomScale)

Zoom in by the given scale.

Parameters:
Name Type Description
zoomScale

(optional) - the scale to zoom in by

Source:

zoomOut(zoomScale)

Zoom out by the given scale.

Parameters:
Name Type Description
zoomScale

(optional) - the scale to zoom in by

Source:

(inner) intersectViewPlane(mouseRay, planeOrigin, planeNormal)

Used to track the movement during camera movement.

Parameters:
Name Type Description
mouseRay

the mouse ray to intersect with

planeOrigin

the origin of the plane

planeNormal

the normal of the plane

Source:
Returns:

the intersection

(inner) onMouseDown(event3D)

Handle the mousedown 3D event.

Parameters:
Name Type Description
event3D

the 3D event to handle

Source:

(inner) onMouseMove(event3D)

Handle the mousemove 3D event.

Parameters:
Name Type Description
event3D

the 3D event to handle

Source:

(inner) onMouseUp(event3D)

Handle the mouseup 3D event.

Parameters:
Name Type Description
event3D

the 3D event to handle

Source:

(inner) onMouseWheel(event3D)

Handle the mousewheel 3D event.

Parameters:
Name Type Description
event3D

the 3D event to handle

Source:

(inner) onTouchDown(event3D)

Handle the touchdown 3D event.

Parameters:
Name Type Description
event3D

the 3D event to handle

Source:

(inner) onTouchMove(event3D)

Handle the touchmove 3D event.

Parameters:
Name Type Description
event3D

the 3D event to handle

Source: