gamepad-axes-as-buttons

1.0.5 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i gamepad-axes-as-buttons

Weekly Downloads

1

Version

1.0.5

License

ISC

Unpacked Size

4.04 kB

Total Files

5

Last publish

Collaborators

  • kevincastejon