[name]

[name] enables a navigation similar to fly modes in DCC tools like Blender. You can arbitrarily transform the camera in 3D space without any limitations (e.g. focus on a specific target).

Example

[example:misc_controls_fly misc / controls / fly ]

Constructor

[name]( [param:Camera object], [param:HTMLDOMElement domElement] )

[page:Camera object]: The camera to be controlled.

[page:HTMLDOMElement domElement]: The HTML element used for event listeners.

Creates a new instance of [name].

Properties

[property:Boolean autoForward]

If set to *true*, the camera automatically moves forward (and does not stop) when initially translated. Default is *false*.

[property:HTMLDOMElement domElement]

The HTMLDOMElement used to listen for mouse / touch events. This must be passed in the constructor; changing it here will not set up new event listeners.

[property:Boolean dragToLook]

If set to *true*, you can only look around by performing a drag interaction. Default is *false*.

[property:Number movementSpeed]

The movement speed. Default is *1*.

[property:Camera object]

The camera to be controlled.

[property:Number rollSpeed]

The rotation speed. Default is *0.005*.

Methods

[method:null dispose] ()

Should be called if the controls is no longer required.

[method:null update] ( [param:Number delta] )

[page:Number delta]: Time delta value.

Updates the controls. Usually called in the animation loop.

Source

[link:https://github.com/mrdoob/three.js/blob/master/examples/js/controls/FlyControls.js examples/js/controls/FlyControls.js]