The demo page we’re going to useRecently, I’ve been implementing the support of the Gamepad API in our gaming engine. Let’s use its code for this tutorial. In this article, I’m using the following browsers:
- Internet Explorer 11, August update (version 11.0.9600.17239) or even better, the developer channel version: devchannel.modern.ie supporting the Gamepad API. A sidenote on IE: Microsoft is working on a new browser Microsoft Edge so be sure to check latest web standards support for it: http://dev.modern.ie/platform/status.
- Chrome 38 developer channel (version 38.0.2125.8 dev-m)
- Opera 23
- Firefox 31 or Firefox 34 Nightly
How to Debug with the Original Source Code
//# sourceMappingURL=babylon.gamepads.js.mapOpen “babylon.gamepads.js.map” to understand how it works:
Using FirefoxLoad the same page: http://david.blob.core.windows.net/babylonjs/gamepad/index.html and press CTRL+SHIFT+S to open the native debugger (don’t use F12/Firebug, it doesn’t support source map). Check that the “Show Original Sources” option is checked: Set a breakpoint as usual on the line 17 and reload the page to break into the code. Firefox doesn’t support mouse hovering on the original source. Step up to line 20 and expand the “this” object instead in the right panel to check that “gamepadEventSupported” is set to true also.
This article is part of the web dev tech series from Microsoft. We’re excited to share Microsoft Edge and the new EdgeHTML rendering engine with you. Get free virtual machines or test remotely on your Mac, iOS, Android, or Windows device @ http://dev.modern.ie/(dpe)