js-gamepad-axes-as-buttons
Monitor axes as buttons on top of Gamepad library
Original work from https://www.npmjs.com/package/gamepad
All events and methods of the original API remain unchanged
Usage:
const GamePad = require("lepioo.gamepad");
GamePad.init();
setInterval(GamePad.processEvents,16);
setInterval(GamePad.detectDevices,500);
GamePad.on("axisDown",(id, axis, direction, timestamp)=>console.log("padId:"+id+" axis:"+axis+" direction:"+direction+" DOWN"));
GamePad.on("axisUp",(id, axis, direction, timestamp)=>console.log("padId:"+id+" axis:"+axis+" direction:"+direction+" UP"));