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
11 11
12// Assumes you only have the default keyboard connected12// Assumes you only have the default keyboard connected
13 13
14
15Object.keys(Controller.Standard).forEach(function (input) {
16 print("Controller.Standard." + input + ":" + Controller.Standard[input]);
17});
18
14Object.keys(Controller.Hardware).forEach(function (deviceName) {19Object.keys(Controller.Hardware).forEach(function (deviceName) {
15 Object.keys(Controller.Hardware[deviceName]).forEach(function (input) {20 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]);
17 });22 });
18});23});
19 24
20Object.keys(Controller.Actions).forEach(function (actionName) {25Object.keys(Controller.Actions).forEach(function (actionName) {
21 print(actionName + ":" + Controller.Actions[actionName]);26 print("Controller.Actions." + actionName + ":" + Controller.Actions[actionName]);
22});27});
23 28
24// Resets every device to its default key bindings:29// Resets every device to its default key bindings: