diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2014-05-12 19:44:16 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2014-05-12 19:44:16 (GMT) |
commit | 9a9afb6aaf314a68901cce3463e91512c261bd7a (patch) | |
tree | 20e7f888da47c67272cfd2c1c16d62e9189ed6c5 /apps/samples/vrml/viewer.html | |
parent | 363250f8a9e33dc3f198f114fdfccd100b55ca12 (diff) | |
download | uscxml-9a9afb6aaf314a68901cce3463e91512c261bd7a.zip uscxml-9a9afb6aaf314a68901cce3463e91512c261bd7a.tar.gz uscxml-9a9afb6aaf314a68901cce3463e91512c261bd7a.tar.bz2 |
Started with JavaScript DM in Java (Rhino)
Diffstat (limited to 'apps/samples/vrml/viewer.html')
-rw-r--r-- | apps/samples/vrml/viewer.html | 89 |
1 files changed, 57 insertions, 32 deletions
diff --git a/apps/samples/vrml/viewer.html b/apps/samples/vrml/viewer.html index 7a1bdb5..1a0732d 100644 --- a/apps/samples/vrml/viewer.html +++ b/apps/samples/vrml/viewer.html @@ -60,7 +60,7 @@ <script type="text/javascript"> require(["dojo/domReady!", "dojo"], function(dom, dojo) { - var viewer = new VRMLViewer("scene1", { + var viewer1 = new VRMLViewer("scene1", { pose: { pitch : 0, roll : 0, @@ -79,40 +79,65 @@ enableSceneshots: false, enableDraggables: false, enablePosePublishing: true, - listNavigationStyle: true, - treeNavigationStyle: true, - listDirectory: "/hard_mp", - imagePath: "/hard_mp/HARD_MP_VAL_000", + listNavigationStyle: false, + treeNavigationStyle: false, + listDirectory: "/cranehook/cranehook_bad_convergence", + imagePath: "/cranehook/cranehook_bad_convergence/HARD_MP_VAL_001", imageFormat: "png", - serverURL: "http://localhost:8082/vrml", - webSocketURL: "ws://localhost:8083/vrml", + serverURL: "http://epikur.local:8008/vrml/", }); - // var viewer2 = new VRMLViewer("scene2", { - // pose: { - // pitch : 0, - // roll : 0, - // yaw : 0, - // zoom : 1, - // x : 0, - // y : 0, - // z : 0, - // autorotate : true - // }, - // height: 300, - // width: 400, - // enableMovies: true, - // enableDND: false, - // enableWebGL: false, - // enableSceneshots: true, - // enableDraggables: true, - // listNavigationStyle: true, - // treeNavigationStyle: true, - // listDirectory: "/hard_mp", - // imagePath: "/hard_mp/HARD_MP_VAL_000", - // imageFormat: "png", - // serverURL: "http://localhost:8082/vrml" - // }); + + var viewer2 = new VRMLViewer("scene2", { + pose: { + pitch : 0, + roll : 0, + yaw : 0, + zoom : 1, + x : 0, + y : 0, + z : 0, + autorotate : true + }, + height: 300, + width: 400, + enableMovies: false, + enableDND: false, + enableWebGL: false, + enableSceneshots: true, + enableDraggables: false, + enablePosePublishing: true, + listNavigationStyle: false, + treeNavigationStyle: false, + listDirectory: "/cranehook/cranehook_bad_convergence", + imagePath: "/cranehook/cranehook_bad_convergence/HARD_MP_VAL_000", + imageFormat: "png", + serverURL: "http://epikur.local:8008/vrml/", + }); + + setTimeout(function() { + setInterval(function(){ + var pose1 = viewer1.getPose(); + var pose2 = viewer2.getPose(); + console.log("Pose1 - pitch: " + pose1.pitch + ", roll: " + pose1.roll + ", yaw: " + pose1.yaw); + console.log("Pose2 - pitch: " + pose2.pitch + ", roll: " + pose2.roll + ", yaw: " + pose2.yaw); + + pose1.pitch += 0.1; + pose2.pitch += 0.1; + + pose1.roll += 0.2; + pose2.roll += 0.2; + + pose1.yaw += 0.4; + pose2.yaw += 0.4; + + viewer1.setPose(pose2); + viewer2.setPose(pose2); + + }, 400); + }, 1000); }); + + </script> </head> <body class="tundra"> |