-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsphere_test.html
453 lines (380 loc) · 17.6 KB
/
sphere_test.html
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
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<meta name="description" content="" />
<meta name="author" content="" />
<!-- MOBILE APP ICONS -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="mobile-web-app-capable" content="yes">
<link rel="icon" sizes="192x192" href="assets/icons/droid-icon.png">
<meta name="application-name" content="CACC Portal">
<meta name="msapplication-square150x150logo" content="assets/icons/win-icon.png" />
<link href="assets/icons/icon.png" rel="apple-touch-icon" />
<link href="assets/icons/startup.png" rel="apple-touch-startup-image" />
<!--[if IE]>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<![endif]-->
<title>CACC Portal</title>
<!-- BOOTSTRAP CORE STYLE -->
<link href="assets/css/bootstrap.css" rel="stylesheet" />
<!-- FONT AWESOME ICONS -->
<link href="assets/css/font-awesome.css" rel="stylesheet" />
<!-- CUSTOM STYLE -->
<link href="assets/css/style.css" rel="stylesheet" />
<!-- HTML5 Shiv and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<script type="text/javascript">
function loaded()
{
roundtime();
currenttime();
closedivs();
}
function loadimage(img){
var webglEl = document.getElementById('sphere');
webglEl.removeChild(webglEl.lastChild);
var width = 800,
height = 600;
var scene = new THREE.Scene();
var camera = new THREE.PerspectiveCamera(75, width / height, 1, 1000);
camera.position.x = 0.1;
var renderer = Detector.webgl ? new THREE.WebGLRenderer() : new THREE.CanvasRenderer();
renderer.setSize(width, height);
var sphere = new THREE.Mesh(
new THREE.SphereGeometry(100, 20, 20),
new THREE.MeshBasicMaterial({
map: THREE.ImageUtils.loadTexture('assets/sphere_images/' + String(img))
})
);
sphere.scale.x = -1;
scene.add(sphere);
var controls = new THREE.OrbitControls(camera);
controls.noPan = true;
controls.noZoom = true;
controls.autoRotate = true;
controls.autoRotateSpeed = 1;
controls.rotateLeft(3);
controls.rotateUp(.3);
webglEl.appendChild(renderer.domElement);
render();
function render() {
controls.update();
requestAnimationFrame(render);
renderer.render(scene, camera);
}
/*
//ENABLES ZOOMING, RUINS SCROLLING
function onMouseWheel(event) {
event.preventDefault();
if (event.wheelDeltaY) { // WebKit
camera.fov -= event.wheelDeltaY * 0.05;
} else if (event.wheelDelta) { // Opera / IE9
camera.fov -= event.wheelDelta * 0.05;
} else if (event.detail) { // Firefox
camera.fov += event.detail * 1.0;
}
camera.fov = Math.max(40, Math.min(100, camera.fov));
camera.updateProjectionMatrix();
}
//document.addEventListener('mousewheel', onMouseWheel, false);
//document.addEventListener('DOMMouseScroll', onMouseWheel, false);
*/
}
function closedivs(){
var rhdiv = document.getElementById("rhdiv");
rhdiv.style.display = 'none';
var abdiv = document.getElementById("abdiv");
abdiv.style.display = 'none';
var alexudiv = document.getElementById("alexudiv");
alexudiv.style.display = 'none';
var alexgdiv = document.getElementById("alexgdiv");
alexgdiv.style.display = 'none';
var rscdiv = document.getElementById("rscdiv");
rscdiv.style.display = 'none';
}
function openrhdiv(){
closedivs();
var rhdiv = document.getElementById("rhdiv");
rhdiv.style.display = 'inline';
}
function openabdiv(){
closedivs();
var abdiv = document.getElementById("abdiv");
abdiv.style.display = 'inline';
}
function openalexudiv(){
closedivs();
var alexudiv = document.getElementById("alexudiv");
alexudiv.style.display = 'inline';
}
function openalexgdiv(){
closedivs();
var alexgdiv = document.getElementById("alexgdiv");
alexgdiv.style.display = 'inline';
}
function openrscdiv(){
closedivs();
var rscdiv = document.getElementById("rscdiv");
rscdiv.style.display = 'inline';
}
function currenttime(){
function checkTime(i) {
return (i < 10) ? "0" + i : i;
}
function startTime() {
var today = new Date();
document.getElementById('time').innerHTML = formatAMPM(today);
var t = setTimeout(function () {
startTime()
}, 500);
}
startTime();
}
function formatAMPM(date) {
var hours = date.getHours();
var minutes = date.getMinutes();
var seconds = date.getSeconds();
var ampm = hours >= 12 ? 'pm' : 'am';
hours = hours % 12;
hours = hours ? hours : 12; // the hour '0' should be '12'
minutes = minutes < 10 ? '0'+minutes : minutes;
seconds = seconds < 10 ? '0'+seconds : seconds;
var strTime = hours + ':' + minutes +':' + seconds + ' ' + ampm;
return strTime;
}
function roundtime(){
function checkcurrentTime() {
var today = new Date(),
m = today.getMinutes();
m = parseInt(m,10);
var ratio = parseInt(m%15,10);
if(ratio == 0){
alert("Round Reminder");
}
var t = setTimeout(function () {
checkcurrentTime()
}, 60000);
}
checkcurrentTime();
}
</script>
</head>
<body onload="loaded()">
<header>
<div class="container">
<div class="row">
<div class="col-md-12">
<button type="button" class="btn btn-primary">Consultant View</button>
<a href="../secret/sup.html"><button type="button" class="btn btn-outline-primary">Go to Supervisor View</button></a>
</div>
</div>
</div>
</header>
<!-- HEADER END-->
<div class="navbar navbar-inverse set-radius-zero">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div class="page-header">
<h1>CACC Portal</h1>
</div>
</div>
</div>
<!-- LOGO HEADER END-->
<section class="menu-section">
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="navbar-collapse collapse ">
<ul id="menu-top" class="nav navbar-nav center-block" >
<li class="menuitem"><a class="text-center" href="index.html" data-toggle="tooltip" data-placement="top" title="Dashboard">
<span class="glyphicon glyphicon-home fa-2x"></span><br>Dashboard
</a></li>
<li class="menuitem"><a class="text-center" href="zed.html" data-toggle="tooltip" data-placement="top" title="ZED">
<span class="glyphicon glyphicon-piggy-bank fa-2x"></span><br>Zed</a></li>
<li class="menuitem"><a class="text-center" href="http://connect.rutgers.edu" target="_blank" data-toggle="tooltip" data-placement="top" title="Connect">
<span class="glyphicon glyphicon-envelope fa-2x"></span><br>Connect</a></li>
<li class="menuitem"><a class="text-center" href="resnet.html" data-toggle="tooltip" data-placement="top" title="Resnet">
<span class="glyphicon glyphicon-wrench fa-2x"></span><br>Resnet</a></li>
<li class="menuitem"><a class="text-center" href="iml.html" data-toggle="tooltip" data-placement="top" title="IML">
<span class="glyphicon glyphicon-calendar fa-2x"></span><br>IML</a></li>
<li class="menuitem"><a class="text-center" href="pts.html" data-toggle="tooltip" data-placement="top" title="PTS">
<span class="glyphicon glyphicon-star fa-2x"></span><br>PTS</a></li>
<li class="menuitem"><a class="text-center" href="nagios.html" data-toggle="tooltip" data-placement="top" title="Nagios">
<span class="glyphicon glyphicon-print fa-2x"></span><br>Nagios</a></li>
<li class="menuitem"><a class="text-center" href="contact.html" data-toggle="tooltip" data-placement="top" title="Information">
<span class="glyphicon glyphicon-info-sign fa-2x"></span><br>Info</a></li>
<li class="menuitem"><a class="text-center" href="https://sakai.rutgers.edu/portal/directtool/02c28b61-a787-421a-a3e7-406afcc8acc3/" target="_blank" data-toggle="tooltip" data-placement="top" title="Wiki">
<span class="glyphicon glyphicon-question-sign fa-2x"></span><br>Wiki</a></li>
<li class="menuitem"><a class="menu-top-active text-center" href="" data-toggle="tooltip" data-placement="top" title="Sphere">
<span class="glyphicon glyphicon-screenshot fa-2x"></span><br>360°</a></li>
</ul>
</div>
</div>
</div>
</div>
</section>
<!-- MENU SECTION END-->
<div class="content-wrapper">
<div class="container">
<div class="row">
<div class="page-head-line" class="col-md-12">
<div style="text-align: left;">
<h3><b id="time"></b></h3>
<!-- <p>Round Timer</p>-->
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div> <div class="col-md-2 col-sm-2 col-xs-2">
<div class="dashboard-div-wrapper bk-clr-five" onclick="openrhdiv()">
<h5>Records Hall</h5>
</div>
</div>
</div>
<div> <div class="col-md-2 col-sm-2 col-xs-2">
<div class="dashboard-div-wrapper bk-clr-one" onclick="openabdiv()">
<h5>Academic Building</h5>
</div>
</div>
</div>
<div> <div class="col-md-2 col-sm-2 col-xs-2">
<div class="dashboard-div-wrapper bk-clr-two" onclick="openalexudiv()">
<h5>Alex Undergrad</h5>
</div>
</div>
</div>
<div> <div class="col-md-2 col-sm-2 col-xs-2">
<div class="dashboard-div-wrapper bk-clr-three" onclick="openalexgdiv()">
<h5>Alex Grad</h5>
</div>
</div>
</div>
<div> <div class="col-md-2 col-sm-2 col-xs-2">
<div class="dashboard-div-wrapper bk-clr-eight" onclick="openrscdiv()">
<h5>RSC</h5>
</div>
</div>
</div>
</div>
</div>
<div id="rhdiv" class="row">
<div> <div class="col-md-2 col-sm-2 col-xs-2">
<div class="dashboard-div-wrapper bk-clr-five" onclick="loadimage('rhgal.jpeg')">
<h5>GAL</h5>
</div>
</div>
</div>
<div> <div class="col-md-2 col-sm-2 col-xs-2">
<div class="dashboard-div-wrapper bk-clr-five" onclick="loadimage('rhalcove.jpeg')">
<h5>Alcove</h5>
</div>
</div>
</div>
<div> <div class="col-md-2 col-sm-2 col-xs-2">
<div class="dashboard-div-wrapper bk-clr-five" onclick="loadimage('rhquietstdy.jpeg')">
<h5>Quiet Study</h5>
</div>
</div>
</div>
</div>
<div id="alexudiv" class="row">
<div> <div class="col-md-2 col-sm-2 col-xs-2">
<div class="dashboard-div-wrapper bk-clr-two" onclick="loadimage('alexu.jpeg')">
<h5>Main Lab</h5>
</div>
</div>
</div>
</div>
<div id="rscdiv" class="row">
<div> <div class="col-md-2 col-sm-2 col-xs-2">
<div class="dashboard-div-wrapper bk-clr-eight" onclick="loadimage('rsc.jpeg')">
<h5>Main Lab</h5>
</div>
</div>
</div>
</div>
<div id="alexgdiv" class="row">
<div> <div class="col-md-2 col-sm-2 col-xs-2">
<div class="dashboard-div-wrapper bk-clr-three" onclick="loadimage('alexg.jpeg')">
<h5>Main Lab</h5>
</div>
</div>
</div>
<div> <div class="col-md-2 col-sm-2 col-xs-2">
<div class="dashboard-div-wrapper bk-clr-three" onclick="loadimage('alexg1.jpeg')">
<h5>Grad Lounge 1</h5>
</div>
</div>
</div>
<div> <div class="col-md-2 col-sm-2 col-xs-2">
<div class="dashboard-div-wrapper bk-clr-three" onclick="loadimage('alexg2.jpeg')">
<h5>Grad Lounge 2</h5>
</div>
</div>
</div>
</div>
<div id="abdiv" class="row">
<div> <div class="col-md-2 col-sm-2 col-xs-2">
<div class="dashboard-div-wrapper bk-clr-one" onclick="loadimage('abgal.jpeg')">
<h5>GAL</h5>
</div>
</div>
</div>
<div> <div class="col-md-2 col-sm-2 col-xs-2">
<div class="dashboard-div-wrapper bk-clr-one" onclick="loadimage('abgal2.jpeg')">
<h5>Entrance</h5>
</div>
</div>
</div>
<div> <div class="col-md-2 col-sm-2 col-xs-2">
<div class="dashboard-div-wrapper bk-clr-one" onclick="loadimage('abiml.jpeg')">
<h5>IML</h5>
</div>
</div>
</div>
<div> <div class="col-md-2 col-sm-2 col-xs-2">
<div class="dashboard-div-wrapper bk-clr-one" onclick="loadimage('abprinter.jpeg')">
<h5>Printer Area</h5>
</div>
</div>
</div>
</div>
<div class="row">
<div id="sphere" class="col-md-12 text-center">
</div>
</div>
</div>
<!-- CONTENT-WRAPPER SECTION END-->
<footer>
<div class="container">
<div class="row">
<div class="col-md-12">
© 2016 CACC Portal
</div>
</div>
</div>
</footer>
<!-- FOOTER SECTION END-->
<!-- JAVASCRIPT AT THE BOTTOM TO REDUCE THE LOADING TIME -->
<!-- CORE JQUERY SCRIPTS -->
<script src="assets/js/jquery-1.11.1.js"></script>
<!-- BOOTSTRAP SCRIPTS -->
<script src="assets/js/bootstrap.js"></script>
<script src="assets/js/three.min.js"></script>
<script src="assets/js/OrbitControls.js"></script>
<script src="assets/js/Detector.js"></script>
</body>
</html>