Skip to content

Arc2D-Framework/responsive-gamepad

Repository files navigation

responsive-gamepad WIP

Handle Keyboard, Gamepad, and Touch Controls under a single API

Proper README Coming soon!

Demo

USAGE

See the index.js at the root of the project, for a proper usage, and touch input example

TL;DR

  1. npm install --save responsive-gamepad

  2. import { ResponsiveGamepad } from './dist/responsive-gamepad.esm';

  3. ResponsiveGamepad.initialize();

  4. ResponsiveGamepad.getState();

TODO

  • Support Multiple Players

  • Full Controller support (X, Y, Triggers, etc...)

  • Code Cleanup

  • Proper Demo

Motivation

WasmBoy

Helpful Links

https://w3c.github.io/gamepad/#remapping

https://css-tricks.com/snippets/javascript/javascript-keycodes/

https://material.io/icons/#ic_gamepad

https://github.com/torch2424/picoDeploy/tree/master/src/components/gamepad

https://github.com/torch2424/picoDeploy/blob/master/src/components/gamepad/gamepad.ts

https://msdn.microsoft.com/en-us/library/windows/desktop/ee417014(v=vs.85).aspx

https://www.reddit.com/r/pcgaming/comments/4zlbrx/what_is_the_difference_between_directinput_and/

https://stackoverflow.com/questions/41251051/is-the-html5-gamepad-api-limited-to-only-4-controllers

https://www.npmjs.com/package/gh-pages

About

Handle Keyboard, Gamepad, and Touch Controls under a single API 🕹️

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%