MozillaReality / gamepad-plus

a superb library that extends the Gamepad API with super powers

Home Page:https://mozvr.github.io/gamepad-plus/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gamepad-plus 🎮

A superb library that extends the Gamepad API with super powers.

Features

  • polyfill the standard events, when unsupported: gamepadconnected, gamepaddisconnected
  • polyfill the non-standard events, when unsupported: gamepadbuttondown, gamepadbuttonup, gamepadaxismove
  • normalise mapping for gamepads in the wild to the Standard Gamepad layout
  • attach an object of attributes about the gamepad and data source

Example

View example of sample usage (source)

Developers

Run this command to compile the JavaScript as a standalone module to dist/gamepads.js:

npm run build

Maintainers

Run this command to publish a new tag to GitHub and version to npm:

npm run release

License

This program is free software and is distributed under an MIT License.

About

a superb library that extends the Gamepad API with super powers

https://mozvr.github.io/gamepad-plus/

License:MIT License


Languages

Language:JavaScript 79.1%Language:CSS 15.0%Language:HTML 5.8%