gamepads
Rust gamepad input library with a focus on ease of use.
use Gamepads;
See the crate documentation and the hello-gamepads example for documentation and sample code.
What it is
- On desktop this library is implemented on top of gilrs.
- On web this is implemented on top of the Gamepad API exposed by browsers, including support for haptic feedback / dual rumble.
- It can be used without
wasm-bindgen, allowing it to be used as amacroquadplugin - It can be used with
wasm-bindgenby activating thefeatures = ["wasm-bindgen"]
- It can be used without
How to use as a macroquad plugin
For non-web targets, nothing special needs to be done to use this library with macroquad.
For a web build to work properly, a small javascript plug-in needs to be registered in the page embedding the built wasm file:
See the hello-gamepads example.
Feedback
Please report any issues found or discuss questions and ideas!