Showing the changes to examples/example/scripts/controllerScriptingExamples.js (1 of 2 files). Show all
Unified · Split
| @@ -29,6 +29,9 @@ if (hydra !== undefined) { · 28 unmodified lines | |||
| 29 | var mapping = Controller.newMapping("Test"); | 29 | var mapping = Controller.newMapping("Test"); |
| 30 | var standard = Controller.Standard; | 30 | var standard = Controller.Standard; |
| 31 | print("standard:" + standard); | 31 | print("standard:" + standard); |
| 32 | mapping.from(function () { return Math.sin(Date.now() / 250); }).to(function (newValue, oldValue, source) { | ||
| 33 | print("function source newValue:" + newValue + ", oldValue:" + oldValue + ", source:" + source); | ||
| 34 | }); | ||
| 32 | mapping.from(hydra.L1).to(standard.A); | 35 | mapping.from(hydra.L1).to(standard.A); |
| 33 | mapping.from(hydra.L2).to(standard.B); | 36 | mapping.from(hydra.L2).to(standard.B); |
| 34 | mapping.from(hydra.L3).to(function (newValue, oldValue, source) { | 37 | mapping.from(hydra.L3).to(function (newValue, oldValue, source) { |