summaryrefslogtreecommitdiffstats
path: root/apps/samples/vrml/viewer.html
diff options
context:
space:
mode:
Diffstat (limited to 'apps/samples/vrml/viewer.html')
-rw-r--r--apps/samples/vrml/viewer.html89
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">