TController
Hierarchy
- TController
Index
Constructors
constructor
Properties
publicisDown
Type declaration
[key string]: boolean
publicoptionalmouseLocation
publicoptionalmouseMovement
publicpointerLocked
Methods
publicaddActionFromKeyEvent
Parameters
action: string
key: string
Returns void
publicaddActionFromMouseEvent
Parameters
action: string
button: number
Returns void
publicaddAxisFromKeyEvent
Parameters
axis: string
key: string
scale: number
Returns void
publicbindAction
Binds an action to a callback for states pressed or released.
Parameters
action: string
state: string
callback: () => void
Returns void
publicdestroy
Tears down the controller and removes all event listeners.
Returns void
publicenableMouseTracking
Returns void
publicenablePointerLock
Parameters
engine: default
Returns void
publicgetAxisValue
Returns the current value of an axis or 0 if it is missing.
Parameters
axis: string
name of the axis
Returns number
publicpossess
Parameters
actor: default
Returns void
publicupdate
Returns void
Adds higher level input handling
add option to unpossess
missing teardown
fix issue that controller updates actors a frame behind the input