Lux Pad
Lux Pad contains mappings for controllers it uses to make working with controllers in the browser a breeze.
Warning
Two Breaking Modifications have just been introduced (my apologies for all inconviences):
Node:
Instead of using
You must now use
Browser:
Lux Pad has just migrated the global browser variable name from LuxPad to simply Lux because since adding new imports to LuxPad the old name would cause issues when trying to do something like
const {LuxPad} = LuxPad
Example
const Lux = const wiiRemote = Lux // Find a single controller with matching propertiesconsole /* Returns a LuxController structured like thisLuxController { type: "wii remote", buttons: {A: true, B: false, ...}, nunchuk: {Z: true, C: false, stick {x: 0, y: 0.242341}}, ...continued}*/const xboxControllers = Lux // Find all controllers with matching propertiesconsole
Supported Controllers
Currently Lux Pad supports the following controllers
Xbox 360
Mayflash Dolphinbar Wii Remote
Feel free to contribute with pull requests to help us support more 😊
Unsupported Controllers
If a controller is unsupported the LuxController object's type will be "unknown"
, but all controllers provide access to the raw controllers object via the rawController
property which can be used directly.
Usage in the Browser Without NPM
Simply download the latest release, include it in your static assets, then import it and the global Lux variable will be provided.