History

get JS source functions working across threads

Brad Hefta-Gaub committed 11 years ago

Commit 8578b401 parent 7956d732 files · +4 −3Browse files

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

Unified · Split

examples/example/scripts/controllerScriptingExamples.js+3−0
@@ -29,6 +29,9 @@ if (hydra !== undefined) { · 28 unmodified lines
2929 var mapping = Controller.newMapping("Test");
3030 var standard = Controller.Standard;
3131 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+ });
3235 mapping.from(hydra.L1).to(standard.A);
3336 mapping.from(hydra.L2).to(standard.B);
3437 mapping.from(hydra.L3).to(function (newValue, oldValue, source) {