# [name]

An extra add-on for creating and using mouse and keyboard controls akin to those found in First-Person Shooters (hence the class name).
Once attached to a camera object, the position of the camera and its lookAt target can be controlled using the mouse and certain keys (depending on the chosen configuration).
The default behaviour is to "pan around" when moving the mouse, and translate forwards or backwards with the left and right buttons pressed. Additionally, the following keys are also enabled:
W — moves forward (equivalent to pressing the left button)
A — moves leftwards
S — moves backwards (equivalent to pressing the right button)
D — moves rightwards
R — moves up
F — moves down
Q — toggle freezing (when "frozen", no changes in the camera position or target will happen)
The camera 'target' is always 100 units ahead of the camera.

## Constructor

### [name]( [page:Object object], [page:Element domElement] )

object — A camera or another object with similar behaviour (has a position property and a lookAt method).
domElement — the element that contains the canvas or WebGL renderer holding the camera we'll control (optional, will use document if nothing is specified)

## Properties

### .[page:Object object]

The camera or object whose position properties will be modified.

### .[page:Element domElement]

Used for determining the viewport dimensions. If nothing is specified, the current HTML document will be used. Else, the specified element dimensions (offsetWidth and offsetHeight) will be used. Additionally, allowing the element to get focused via tabbing is disabled.

### .[page:Float movementSpeed]

Configure how fast will the camera translations be. Default is 1.0.

### .[page:Float lookSpeed]

Configure how fast will the camera move to 'look around'. Default is 0.005.

### .[page:Boolean lookVertical]

Allows the camera to change its vertical angle, thus modifying the camera pitch. If disabled, the mouse movements will only change the yaw.
Default is true.

### .[page:Boolean autoForward]

Toggle between automatically moving forward without user intervention (i.e. without pressing the left button or the W key) or not. If in autoForward mode, pressing the right button or the S key will still go backwards (temporarily stopping the forward motion).
Default is false.

### .[page:Boolean activeLook]

If true, left clicking moves forward and right clicking moves backwards, and moving the mouse around changes the point of view.
If false, nothing happens on mouse events.
Default is true.

### .[page:Boolean heightSpeed]

??? TODO
Default is false.

### .[page:Float heightCoef]

??? TODO
Default is 1.0.

### .[page:Float heightMin]

??? TODO
Default is 0.0.

### .[page:Boolean constrainVertical]

Limit camera's pitch range. If true, the pitch angle can only be in the [verticalMin, verticalMax] range.
Default is false.

### .[page:Float verticalMin]

See constrainVertical property.
Default is 0.0.

### .[page:Float verticalMax]

See constrainVertical property.
Default is Math.PI.

## Methods

### .update( [page:Float delta] )

Update values using delta as time difference
delta — time elapsed since the last time update was called.

### .handleResize( )

Recalculate viewport dimensions.

## Source

[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]