History

implement StandardController and expose it to JS as Controller.Standard.*

Brad Hefta-Gaub committed 11 years ago

Commit 0986f861 parent 83bf8c84 files · +48 −3Browse files

Showing the changes to examples/example/scripts/controllerScriptingExamples.js (1 of 4 files). Show all

Unified · Split

examples/example/scripts/controllerScriptingExamples.js+7−2
@@ -11,14 +11,19 @@ · 10 unmodified lines
1111
1212 // Assumes you only have the default keyboard connected
1313
14+
15+Object.keys(Controller.Standard).forEach(function (input) {
16+ print("Controller.Standard." + input + ":" + Controller.Standard[input]);
17+});
18+
1419 Object.keys(Controller.Hardware).forEach(function (deviceName) {
1520 Object.keys(Controller.Hardware[deviceName]).forEach(function (input) {
16− print(deviceName + "." + input + ":" + Controller.Hardware[deviceName][input]);
21+ print("Controller.Hardware." + deviceName + "." + input + ":" + Controller.Hardware[deviceName][input]);
1722 });
1823 });
1924
2025 Object.keys(Controller.Actions).forEach(function (actionName) {
21− print(actionName + ":" + Controller.Actions[actionName]);
26+ print("Controller.Actions." + actionName + ":" + Controller.Actions[actionName]);
2227 });
2328
2429 // Resets every device to its default key bindings: