-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathindex.html
91 lines (72 loc) · 2.79 KB
/
index.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
<!doctype html>
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js ie7 oldie" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js ie8 oldie" lang="en"> <![endif]-->
<!-- Consider adding an manifest.appcache: h5bp.com/d/Offline -->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<!-- Use the .htaccess and remove these lines to avoid edge case issues.
More info: h5bp.com/b/378 -->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title></title>
<meta name="description" content="">
<meta name="author" content="Karel Maesen" >
<!-- CSS: implied media=all -->
<!-- CSS concatenated and minified via ant build script-->
<link rel="stylesheet" href="css/style.css">
<!-- end CSS-->
</head>
<body>
<script defer src="js/panoview.js"></script>
<!-- Prompt IE 6 users to install Chrome Frame. Remove this if you want to support IE 6.
chromium.org/developers/how-tos/chrome-frame-getting-started -->
<!--[if lt IE 7 ]>
<script src="//ajax.googleapis.com/ajax/libs/chrome-frame/1.0.3/CFInstall.min.js"></script>
<script>window.attachEvent('onload',function(){CFInstall.check({mode:'overlay'})})</script>
<![endif]-->
<script>
function loadViewer(){
var canvasEl = document.getElementById("pano");
if(!canvasEl){
alert('Canvas element not found.');
}
var viewer = new PanoViewer();
viewer.init(canvasEl);
viewer.on('view-update', function(pov){
var povEl = document.getElementById("pov");
var str = "<li> yaw = " + pov.yaw + "</li>" ;
str += "<li> pitch = " + pov.pitch + "</li>" ;
str += "<li> zoom = " + pov.zoom + "</li>";
str += "<li> left edge = " + viewer.normalizeX(pov.yaw - pov.hFov/2) + "</li>";
povEl.innerHTML = str;
var ywfrm = document.getElementById("yaw-form");
ywfrm.setAttribute("value", pov.yaw);
});
var btn = document.getElementById("btnUpdate");
btn.addEventListener('click', function(ev) {
var p = parseFloat(document.getElementById("yaw-form").value);
var z = parseFloat(document.getElementById("zoom-form").value);
viewer.setPov({yaw: p, zoom: z});
});
viewer.loadImageSrc('panos/5C01K8RM.jpg', {yaw: 90.0});
}
</script>
<body onLoad="loadViewer();">
<h1>Prototype Panoramische viewer</h1>
<div id="container">
<canvas id="pano" width="800" height="600">
Get a better browser!
</canvas>
<form>
<input id="yaw-form" type="text" value="0.0" name="yaw"/>
<input id="zoom-form" type="text" value="1.0" name="zoom"/>
<input type="button" id="btnUpdate" value="apply" />
</form>
<h3>Image info</h3>
<ul id="pov">
</ul>
</div>
</body>
</html>