Skip to main content

Class: FirstPersonControls2

Extra-Helpers.FirstPersonControls2

Hierarchy

Methods

addEventListener

addEventListener(type, listener): void

Adds a listener to an event type.

Parameters

NameType
type"change"
listener(event: IEvent<"change">) => void

Returns

void

Inherited from

SimpleEventDispatcher.addEventListener

Defined in

webgi/src/helpers/EventDispatcher.ts:48


hasEventListener

hasEventListener(type, listener): boolean

Checks if listener is added to an event type.

Parameters

NameType
type"change"
listener(event: IEvent<"change">) => void

Returns

boolean

Inherited from

SimpleEventDispatcher.hasEventListener

Defined in

webgi/src/helpers/EventDispatcher.ts:56


removeEventListener

removeEventListener(type, listener): void

Removes a listener from an event type.

Parameters

NameType
type"change"
listener(event: IEvent<"change">) => void

Returns

void

Inherited from

SimpleEventDispatcher.removeEventListener

Defined in

webgi/src/helpers/EventDispatcher.ts:63


dispatchEvent

dispatchEvent(event): void

Fire an event type.

Parameters

NameType
eventIEvent<"change">

Returns

void

Inherited from

SimpleEventDispatcher.dispatchEvent

Defined in

webgi/src/helpers/EventDispatcher.ts:74


setOrientation

setOrientation(): void

Returns

void

Defined in

webgi/src/helpers/threejs/FirstPersonControls2.ts:96


handleResize

handleResize(): void

Returns

void

Defined in

webgi/src/helpers/threejs/FirstPersonControls2.ts:108


onMouseDown

onMouseDown(event): void

Parameters

NameType
eventMouseEvent

Returns

void

Defined in

webgi/src/helpers/threejs/FirstPersonControls2.ts:124


onMouseUp

onMouseUp(event): void

Parameters

NameType
eventMouseEvent

Returns

void

Defined in

webgi/src/helpers/threejs/FirstPersonControls2.ts:148


onMouseMove

onMouseMove(event): void

Parameters

NameType
eventMouseEvent

Returns

void

Defined in

webgi/src/helpers/threejs/FirstPersonControls2.ts:166


onKeyDown

onKeyDown(event): void

Parameters

NameType
eventKeyboardEvent

Returns

void

Defined in

webgi/src/helpers/threejs/FirstPersonControls2.ts:182


onKeyUp

onKeyUp(event): void

Parameters

NameType
eventKeyboardEvent

Returns

void

Defined in

webgi/src/helpers/threejs/FirstPersonControls2.ts:208


lookAt

lookAt(x, y?, z?): FirstPersonControls2

Parameters

NameType
xnumber | Vector3
y?number
z?number

Returns

FirstPersonControls2

Defined in

webgi/src/helpers/threejs/FirstPersonControls2.ts:234


update

update(): void

Returns

void

Defined in

webgi/src/helpers/threejs/FirstPersonControls2.ts:260


dispose

dispose(): void

Returns

void

Defined in

webgi/src/helpers/threejs/FirstPersonControls2.ts:331


onContextMenu

onContextMenu(event): void

Parameters

NameType
eventEvent

Returns

void

Defined in

webgi/src/helpers/threejs/FirstPersonControls2.ts:343

Properties

object

Readonly object: Object3D<Event>

Defined in

webgi/src/helpers/threejs/FirstPersonControls2.ts:19


domElement

Readonly domElement: HTMLElement | Document

Defined in

webgi/src/helpers/threejs/FirstPersonControls2.ts:20


enabled

enabled: boolean = true

Defined in

webgi/src/helpers/threejs/FirstPersonControls2.ts:23


enableKeys

enableKeys: boolean = true

Defined in

webgi/src/helpers/threejs/FirstPersonControls2.ts:24


movementSpeed

movementSpeed: number = 1.0

Defined in

webgi/src/helpers/threejs/FirstPersonControls2.ts:26


lookSpeed

lookSpeed: number = 0.005

Defined in

webgi/src/helpers/threejs/FirstPersonControls2.ts:27


lookVertical

lookVertical: boolean = true

Defined in

webgi/src/helpers/threejs/FirstPersonControls2.ts:29


autoForward

autoForward: boolean = false

Defined in

webgi/src/helpers/threejs/FirstPersonControls2.ts:30


activeLook

activeLook: boolean = true

Defined in

webgi/src/helpers/threejs/FirstPersonControls2.ts:32


heightSpeed

heightSpeed: boolean = false

Defined in

webgi/src/helpers/threejs/FirstPersonControls2.ts:34


heightCoef

heightCoef: number = 1.0

Defined in

webgi/src/helpers/threejs/FirstPersonControls2.ts:35


heightMin

heightMin: number = 0.0

Defined in

webgi/src/helpers/threejs/FirstPersonControls2.ts:36


heightMax

heightMax: number = 1.0

Defined in

webgi/src/helpers/threejs/FirstPersonControls2.ts:37


constrainVertical

constrainVertical: boolean = false

Defined in

webgi/src/helpers/threejs/FirstPersonControls2.ts:39


verticalMin

verticalMin: number = 0

Defined in

webgi/src/helpers/threejs/FirstPersonControls2.ts:40


verticalMax

verticalMax: number = Math.PI

Defined in

webgi/src/helpers/threejs/FirstPersonControls2.ts:41


mouseDragOn

mouseDragOn: boolean = false

Defined in

webgi/src/helpers/threejs/FirstPersonControls2.ts:43


autoSpeedFactor

autoSpeedFactor: number = 0.0

Defined in

webgi/src/helpers/threejs/FirstPersonControls2.ts:47


mouseX

mouseX: number = 0

Defined in

webgi/src/helpers/threejs/FirstPersonControls2.ts:49


mouseY

mouseY: number = 0

Defined in

webgi/src/helpers/threejs/FirstPersonControls2.ts:50


moveForward

moveForward: boolean = false

Defined in

webgi/src/helpers/threejs/FirstPersonControls2.ts:52


moveBackward

moveBackward: boolean = false

Defined in

webgi/src/helpers/threejs/FirstPersonControls2.ts:53


moveLeft

moveLeft: boolean = false

Defined in

webgi/src/helpers/threejs/FirstPersonControls2.ts:54


moveRight

moveRight: boolean = false

Defined in

webgi/src/helpers/threejs/FirstPersonControls2.ts:55


moveUp

moveUp: boolean = false

Defined in

webgi/src/helpers/threejs/FirstPersonControls2.ts:56


moveDown

moveDown: boolean = false

Defined in

webgi/src/helpers/threejs/FirstPersonControls2.ts:57


viewHalfX

viewHalfX: number = 0

Defined in

webgi/src/helpers/threejs/FirstPersonControls2.ts:59


viewHalfY

viewHalfY: number = 0

Defined in

webgi/src/helpers/threejs/FirstPersonControls2.ts:60

Constructors

constructor

new FirstPersonControls2(object, domElement)

Parameters

NameType
objectObject3D<Event>
domElementHTMLElement | Document

Overrides

SimpleEventDispatcher.constructor

Defined in

webgi/src/helpers/threejs/FirstPersonControls2.ts:69