1.0.5 • Published 5 years ago

gamepad-axes-as-buttons v1.0.5

Weekly downloads
2
License
ISC
Repository
github
Last release
5 years ago

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"));

Github sources