Skip to content

Instantly share code, notes, and snippets.

@samiare
Last active September 6, 2016 17:58
Show Gist options
  • Save samiare/fc679fe70e93c43c6f7d9a6a468d266d to your computer and use it in GitHub Desktop.
Save samiare/fc679fe70e93c43c6f7d9a6a468d266d to your computer and use it in GitHub Desktop.
Controller.js Settings Example
Controller.search()
Controller.globalSettings.useAnalogAsDpad = "left";
window.addEventListener("gc.button.press", function(event) {
// Pressing the left analog stick in any of the 4 cardinal
// directions will fire this event as if it were the
// appropriate d-pad button, i.e. DPAD_UP, DPAD_LEFT, etc.
}, false);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment