-
Notifications
You must be signed in to change notification settings - Fork 34
Description
It's kind of hard to read (count) the indices in the arrays to figure out which buttons/axes are mapped to which indices. It would be nice if we could specify the buttons and axes mappings as an object with each key being the constant string (e.g., 'LEFT_TOP_SHOULDER') instead of the index (e.g., 4).
Buttons:
https://github.com/kallaspriit/HTML5-JavaScript-Gamepad-Controller-Library/blob/af601ac2/gamepad.js#L481
https://github.com/kallaspriit/HTML5-JavaScript-Gamepad-Controller-Library/blob/af601ac2/gamepad.js#L424-L430
Axes:
https://github.com/kallaspriit/HTML5-JavaScript-Gamepad-Controller-Library/blob/af601ac2/gamepad.js#L484
https://github.com/kallaspriit/HTML5-JavaScript-Gamepad-Controller-Library/blob/af601ac2/gamepad.js#L438