CLASSES
TagsA - Z

GenericPad

Gamepad

Description

class GenericPad extends Gamepad

Constructor

new GenericPad(id, index, browserGamepad)

Parameters

Name Type Description
id string The gamepad id
index number The gamepad index
browserGamepad any

Methods

onbuttondown(callback) → void

Binds an action to the button pressed, recognized by the button's index in the array

Parameters

Name Type Description
callback (buttonPressed: number) => void The function to execute

onbuttonup(callback) → void

Binds an action to the button released, recognized by the button's index in the array

Parameters

Name Type Description
callback (buttonReleased: number) => void The function to execute

update() → void