First person controls allow the camera to move on the scene like a character in the first-person view mode.
Array of collision objects used to constraint the movements of the camera.
The HTMLElement used to listen for mouse / touch events. This must be passed in the constructor; changing it here will not set up new event listeners. Default is the whole document.
Whether or not the controls are enabled.
Whether or not the camera collisions are enabled.
Whether to enable damping (inertia), which is used to give a sense of
weight to the controls. Default is true
.
Note that if this is enabled, you must call .update() in your animation loop.
Enable or disable the use of keyboard controls. Default is true
.
Enable or disable camera panning. Default is true
.
Enable the pointer lock feature to capture the mouse pointer upon app start. The user should click somewhere on the screen to lock up the cursor and move in 3D space without the need to click/drag with the mouse buttons. Default is false
.
Enable or disable horizontal and vertical rotation of the camera. Default is true
.
Note that it is possible to disable a single axis by setting the min and max of the polar angle or azimuth angle to the same value, which will cause the vertical or horizontal rotation to be fixed at that value.
Enable or disable zooming (dollying) of the camera. Default is true
.
Camera "gaze" (or "head"/"eyes") level. Default is 1.8
.
Flag which says whether the camera is currently in the state of tweening.
The camera (or other object) that is being controlled.
The panning damping inertia used if .enableDamping is set to true
. Note that for this to work, you must call .update() in your animation loop. Default is 0.05
.
Speed of panning (pixels moved) when using keyboard arrow keys. Default is 0.15
.
The rotation damping inertia used if .enableDamping is set to true. Note that for this to work, you must call .update() in your animation loop. Default is 0.05
.
Same as .rotateInertia, but for the touch-based controls used on mobile devices. Default value is 0.05
.
Speed of rotation. Default is 0.9
.
Speed of rotation on touch-based devices. Default is 0.75
.
Screen offset and size.
Maximum height of the story. Specify if you need multiple floors in your scene, such as two-level cottage or large shopping mall. Default is 3.0
.
Speed of zooming / dollying. Default is 30.0
.
Speed of zooming when using keyboard arrow keys. Default is 0.2
.
The zoom damping inertia used if .enableDamping is set to true. Note that for this to work, you must call .update() in your animation loop. Default is 0.05
.
Remove all the event listeners.
Update the .screen object by retrieving position and size of the .domElement.
Change the camera's current position and target point to the specified new position and target smoothly over the specified time.
Change the orthographic camera target point and zoom factor smoothly over the specified period of time.
Update the controls. Must be called after any manual changes to the camera's transform, or in the update loop if .autoRotate or .enableDamping are set.
For more info on how to obtain the source code of this module see this page.