A simple HTML5 Gamepad handler that provides keyboard-like events for Gamepad sticks and buttons.
V1:
listener.on('gamepad:axis', function (event) {
const { stick, axis } = event.detail;
// { stick: 0, axis: 1 }
});
V2:
listener.on('gamepad:axis', function (event) {
const { axis } = event.detail;
// axis: 3
});
Npm security update
Fix sticks count from axes.
Support any number of sticks (and not juste "2").
Updated dependencies
Completly rewriten in ES6 + Updated depenencies