Controls

Camera controls.

Controls Constants

These constants define camera controls.

Tweening Movement Types

v3d.TweenLinear v3d.TweenSpherical

Constructor

Controls(object : Camera, domElement : HTMLElement)

object
The camera to be controlled.
domElement
The HTML element used for event listeners (optional). By default this is the whole document, however if you only want to the controls to work over a specific element (e.g. the canvas) you can specify that here.

Creates a new Controls. Note that this class is not intended to be called directly; you probably want to use OrbitControls, FlyingControls, or FirstPersonControls instead.

Properties

.allowMouseOverIframes : Boolean

Whether or not the mouse will be allowed to move above the <iframe> elements located on the page, when it's controlling the camera. Default is false;

.domElement : HTMLElement

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.

.enabled : Boolean

Whether or not the controls are enabled.

.object : Camera

The camera (or other object) that is being controlled.

Methods

.lockIframeEvents()

Prevent all <iframe> elements located on the current page to capture user events.

.unlockIframeEvents() → Float

Allow all <iframe> elements located on the current page to capture user events.

Source

For more info on how to obtain the source code of this module see this page.