summaryrefslogtreecommitdiffstats
path: root/apps/samples/vrml/viewer.html
blob: 467681ef676f09bdb1ec27fcc902010084280223 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
    <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/dojo/1.8.3/dijit/themes/tundra/tundra.css">
    <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/dojo/1.8.3/dojox/layout/resources/FloatingPane.css">
    <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/dojo/1.8.3/dojox/layout/resources/ResizeHandle.css">
    <link rel="stylesheet" href="viewer.css">

		<style type="text/css">
			.alternateDock {
				position:absolute; 
				background-color:#ededed;
				right:0px; top:0px;
				border-left:1px solid #ccc; 
				height:100%; 

			}
			#alternateDock ul.dojoxDockList { display:block; }
			.testFixedSize {
				width:300px;
				height:200px;
				padding:7px;			
			}
			
			.dijitMenuItemLabel {
				font-size: 12px;
			}
			
			.tundra .dijitTooltipContainer {
				background-color:rgba(200,200,200,0.5);
				background:rgba(200,200,200,0.5);
			}
/*			.removeThumb {
				background-image: url(img/close.png);
			  background-repeat: no-repeat;
				background-size: 100%;
			  text-align: center;
				border: 0px;
				width: 20px;
				height: 20px;
				vertical-align: top;
				margin: -3px 0px 0px -8px;
			}
*/		</style>

		<script type="text/javascript">
		// dojoConfig = {
		//     async : false,
		//     isDebug : true,
		//     debugAtAllCosts : true,
		// }
		</script>

  	<script src="http://uscxml.tk.informatik.tu-darmstadt.de/scripts/osg.js"></script>
		<script src="http://ajax.googleapis.com/ajax/libs/dojo/1.8.3/dojo/dojo.js"></script>
    <script type="text/javascript" src="viewer-webgl.js"></script>
    <script type="text/javascript" src="annotations.js"></script>
    
    <script type="text/javascript">

			require(["dojo/domReady!", "dojo"], function(dom, dojo) {
        // var viewer1 = new VRMLViewer("scene1", {
        //  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: true,
        //  enableSceneshots: false,
        //  enableDraggables: false,
        //  enablePosePublishing: true,
        //  listNavigationStyle: true,
        //  treeNavigationStyle: true,
        //  listDirectory: "10975/57",
        //  imagePath: "10975/57/latest",
        //  imageFormat: "png",
        //  serverURL: "http://femkit.smartvortex.eu:8086/vrml/",
        // });

        var vrmlViewer = new VRMLViewer("scene1", {
          resRoot: "/img/tridi/",
          enableMovies: false,
          enableDND: false,
          enableWebGL: true,
          enableSceneshots: false,
          enableDraggables: false,
          listNavigationStyle: true,
          treeNavigationStyle: true,
          width: 550,
          height: 550,
          imagePath: "/10975/56/latest",
          imageFormat: "png",
          listDirectory: "/10975/56",
          serverURL: "http://femkit.smartvortex.eu:8086/vrml",
        });

        // http://femkit.smartvortex.eu:8086/vrml/10975/57/latest.osgjs

        // 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://femkit.smartvortex.eu:8086/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">
		<table align="center">
			<tr>
				<td ><br /><br /><br /><br /><br /><br />
					<div id="scene1" />
				</td>
				<td><br /><br /><br /><br /><br /><br />
					<div id="scene2" />
				</td>
			</tr>
			<tr><td>
				<div id="annotations1"></div>
			</td></tr>
		</table>
	</body>
</html>