PointerLockControls

THREE.PointerLockControls
class PointerLockControls(camera: Camera, domElement: UndefOr[HTMLElement]) extends Object

PointerLockControls is a perfect choice for first person 3D games. The implementation of this class is based on the Pointer Lock API.

Attributes

Graph
Supertypes
class Object
trait Any
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def dispose(): Unit

Dispose of the controls.

Dispose of the controls.

Attributes

Returns the look direction of the camera.

Returns the look direction of the camera.

Value parameters

v
  • The target vector that is used to store the method's result.

Attributes

Returns

The normalized direction vector.

def lock(unadjustedMovement: Boolean): Unit

Activates the pointer lock.

Activates the pointer lock.

Value parameters

unadjustedMovement
  • Disables OS-level adjustment for mouse acceleration, and accesses raw mouse input instead. Setting it to true will disable mouse acceleration.

Attributes

def moveForward(distance: Double): Unit

Moves the camera forward parallel to the xz-plane. Assumes camera.up is y-up.

Moves the camera forward parallel to the xz-plane. Assumes camera.up is y-up.

Value parameters

distance
  • The signed distance.

Attributes

def moveRight(distance: Double): Unit

Moves the camera sidewards parallel to the xz-plane.

Moves the camera sidewards parallel to the xz-plane.

Value parameters

distance
  • The signed distance.

Attributes

def unlock(): Unit

Exits the pointer lock.

Exits the pointer lock.

Attributes

Inherited methods

def hasOwnProperty(v: String): Boolean

Attributes

Inherited from:
Object
def isPrototypeOf(v: Object): Boolean

Attributes

Inherited from:
Object
def propertyIsEnumerable(v: String): Boolean

Attributes

Inherited from:
Object
def toLocaleString(): String

Attributes

Inherited from:
Object
def valueOf(): Any

Attributes

Inherited from:
Object

Concrete fields

val isLocked: Boolean

Whether the controls are locked or not.

Whether the controls are locked or not.

Attributes

var maxPolarAngle: Double

Camera pitch, upper limit. Range is '[0, Math.PI]' in radians.

Camera pitch, upper limit. Range is '[0, Math.PI]' in radians.

Attributes

var minPolarAngle: Double

Camera pitch, lower limit. Range is '[0, Math.PI]' in radians.

Camera pitch, lower limit. Range is '[0, Math.PI]' in radians.

Attributes

var pointerSpeed: Double

Multiplier for how much the pointer movement influences the camera rotation.

Multiplier for how much the pointer movement influences the camera rotation.

Attributes