gamepads 0.1.0

API to access information about system gamepads.
Documentation

gamepads

A crate to expose gamepad information in browsers using the Gamepad API exposed by browsers.

[dependencies]
gamepads = "0.1.0"

On web, this crate uses a small javascript function, making it possible to use as a macroquad plugin - more about that below.

Macroquad plugin

A macroquad plugin to access gamepad information in browsers.

First add the javascript, either bundling macroquad-gamepads.js or embedding it after:

<script src="https://not-fl3.github.io/miniquad-samples/mq_js_bundle.js"></script>
<script src="https://fornwall.github.io/gamepads/macroquad-gamepads.js"></script>
<script>
  load("your-wasm-file.wasm");
</script>

Report issues

Please report any issues found!