-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
133 lines (133 loc) · 4.53 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
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
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<title>UMI3</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta property="og:title" content="UMI3">
<meta property="og:description" content="">
<meta name="mobile-web-app-capable" content="yes" />
<meta property="og:image" content="preview.jpg">
<style type="text/css" title="Default">
/* fullscreen */
html {
height:100%;
}
body {
height:100%;
margin: 0px;
background: black;
color: white;
overflow:hidden; /* disable scrollbars */
-webkit-tap-highlight-color: rgba(0, 0, 0, 0); /* remove highlight on tab for iOS/Android */
}
/* fix for scroll bars on webkit & >=Mac OS X Lion */
::-webkit-scrollbar {
background-color: rgba(0,0,0,0.5);
width: 0.75em;
height: 0.75em;
}
::-webkit-scrollbar-thumb {
background-color: rgba(255,255,255,0.5);
}
</style>
</head>
<body>
<!-- - - - - - - 8<- - - - - - cut here - - - - - 8<- - - - - - - -->
<script type="text/javascript" src="pano2vr_player.js?ts=33257331">
</script>
<script type="text/javascript" src="skin.js?ts=33257331">
</script>
<script src="https://www.youtube.com/iframe_api"></script>
<script src="https://player.vimeo.com/api/player.js"></script>
<script src="3rdparty/lottie/lottie.min.js"></script>
<div id="container" style="width:100%;height:100%;overflow:hidden;">
<br>Loading...<br><br>
</div>
<script type="text/javascript">
function parseParams(paramsString, params) {
paramsString = paramsString.substring(1);
var firstSeparatorPos = paramsString.indexOf(",");
if (firstSeparatorPos != -1) {
params.startNode = paramsString.slice(0, firstSeparatorPos);
var viewingParamsString = paramsString.slice(firstSeparatorPos + 1);
var viewingParams = viewingParamsString.split(",");
if (viewingParams.length >= 3) {
var startView = {};
startView["pan"] = viewingParams[0];
startView["tilt"] = viewingParams[1];
startView["fov"] = viewingParams[2];
if (viewingParams.length >= 4) {
startView["projection"] = viewingParams[3];
}
params.startView = startView;
}
} else {
params.startNode = paramsString;
params.startView = "";
}
}
var params = {};
parseParams(document.location.hash, params);
var startNode = params.startNode;
var startView = params.startView;
if (("onhashchange" in window) && (!(/MSIE (\d+\.\d+);/.test(navigator.userAgent)))) {
window.onhashchange = function () {
parseParams(window.location.hash, params);
pano.openNext('{' + params.startNode + '}', params.startView);
}
} else {
var lastHash = window.location.hash;
window.setInterval(function () {
if (window.location.hash != lastHash) {
lastHash = window.location.hash;
parseParams(window.location.hash, params);
pano.openNext('{' + params.startNode + '}', params.startView);
}
}, 100);
}
// create the panorama player with the container
pano=new pano2vrPlayer("container");
pano.startNode = startNode;
pano.startView = startView;
pano.setQueryParameter("ts=33257331")
// add the skin object
skin=new pano2vrSkin(pano);
// load the configuration
window.addEventListener("load", function() {
pano.readConfigUrlAsync("pano.xml?ts=33257331");
});
if (window.navigator.userAgent.match(/Safari/i)) {
// fix for white borders, rotation on iPhone
function iosHfix(e) {
window.scrollTo(0, 1);
var container=document.getElementById("container");
var oh=container.offsetHeight;
document.documentElement.style.setProperty('height', '100vh');
if (oh!=container.offsetHeight) {
container.style.setProperty('height',"100%");
} else {
container.style.setProperty('height',window.innerHeight+"px");
}
window.scrollTo(0, 0);
pano.setViewerSize(container.offsetWidth, container.offsetHeight);
};
setTimeout(iosHfix,0);
setTimeout(iosHfix,100);
window.addEventListener("resize", function() {
setTimeout(iosHfix,0);
// hide toolbar on iPad happens with a delay
setTimeout(iosHfix,500);
setTimeout(iosHfix,1000);
setTimeout(iosHfix,2000);
});
}
</script>
<noscript>
<p><b>Please enable Javascript!</b></p>
</noscript>
<!-- - - - - - - 8<- - - - - - cut here - - - - - 8<- - - - - - - -->
</body>
</html>