Class: Controls
controls/controls.Controls
Stores common properties and methods for controls.
Hierarchy
Controls
โณ
TouchControls
Constructors
constructor
โข new Controls(element
, camera
, object?
, sensitivity?
)
Creates a Controls instance.
Parameters
Name | Type | Default value | Description |
---|---|---|---|
element | HTMLElement | undefined | The element to use when handling control events |
camera | Camera | undefined | - |
object? | Object2D | undefined | An optional object to follow the camera's yaw |
sensitivity | number | 0.1 | Movement sensitivity |
Defined in
src/controls/controls.ts:23
Properties
camera
โข camera: Camera
Defined in
src/controls/controls.ts:14
element
โข element: HTMLElement
Defined in
src/controls/controls.ts:8
movementX
โข movementX: number
= 0
Defined in
src/controls/controls.ts:10
movementY
โข movementY: number
= 0
Defined in
src/controls/controls.ts:11
object
โข object: Object2D
Defined in
src/controls/controls.ts:13
sensitivity
โข sensitivity: number
Defined in
src/controls/controls.ts:9
Methods
dispose
โธ Abstract
dispose(): void
Removes all events used for the controls and deals with any extra cleanup needed.
Returns
void
Defined in
src/controls/controls.ts:38
update
โธ Abstract
update(): void
Called every tick.
Returns
void
Defined in
src/controls/controls.ts:33