CanvasMap
Getting Started Tutorials 3D Reference

Class CM3ControlsOrbit extends CM3Controls

Orbit controls for CanvsMap. This file was originally "OrbitControls.js" and was provided
with Three.js. However, the class needed to be modified to work with CanvasMap, specifically
to deal with selections, which are handled within the view. This meant that the view needs
to filter the selections within the view and only pass them to the controls if nothing was selected

This class uses a THREE.Quaternion() class to manage the motions with spherical coordinates.

target - the coordinate that the view is orbiting around (the center)
TheObject - the current camera position. This class works by moving and reorienting the camera
as the user moves the mouse or clicks keys.

For sperical coordinates:
- theta - equatorial angle (longitude) in radians
- phi - polar angle from the north pole (or up) (latitude in radians)
Private properties:
- scope - a copy of the this pointer


Settings Group: OrbitControls

Setting Name Type Options Default Comments
MinDistance Min Distance CMTYPE_FLOAT 0
MaxDistance Max Distance CMTYPE_FLOAT Infinity
MinLatitude Min Latitude CMTYPE_FLOAT -90
MaxLatitude Max Latitude CMTYPE_FLOAT 90