Classes
Members
instance :GamepadHelper
Type:
- Source:
Methods
forwardToHud()
Returns true if HUD can process gamepad event, i.e. a button or form is currently active.
- Source:
gamepadButton(index, state)
Gamepad button event handler. Buttons left/right/up/down are forwarded to the HUD.
Trigger button and select button events are forwarded either to HUD, or to the scene, as appropriate.
Parameters:
Name | Type | Description |
---|---|---|
index |
button index, see https://github.com/alvaromontoro/gamecontroller.js/blob/master/public/gamepad.svg | |
state |
true/false for pressed/released |
- Source:
trackGamepad()
Main point of gamepad support, called from the constructor.
Once the browser emits gamepadconnected event,
installs tracker function into main rendering loop, to track states that
rotate the camera, teleport, and fire gamepad button events.
- Source: