-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
104 lines (82 loc) · 3.72 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
<!DOCTYPE HTML>
<HTML lang="en">
<HEAD><TITLE>360 3D Experiment</TITLE>
<META NAME="AUTHOR" CONTENT="Derek Stillingfleet">
<META NAME="viewport" CONTENT="width=device-width, initial-scale=1">
<META http-equiv="Content-Type" content="text/html;charset=utf-8">
<LINK rel="shortcut icon" href="https://www.virtualmountains.co.uk/favicon.ico">
<link rel="stylesheet" href="pannellum.css?t=1"/>
<script type="text/javascript" src="pannellum.js?t=1"></script>
<STYLE>
#panoramaA {position:absolute; width:50%; height:100%; top:0; left:0; z-index:20;}
#panoramaB {position:absolute; width:50%; height:100%; top:0; left:50%; z-index:20;}
#panoramaC {position:absolute; width:50%; height:100%; top:0; left:0; z-index:10;}
#panoramaD {position:absolute; width:50%; height:100%; top:0; left:50%; z-index:10;}
#OverTheTop {position:absolute; width:100%; height:100%; top:0; left:0; z-index:30;}
</STYLE>
<script>
var ActualYaw=0;
var ActualHFOV=0;
var LastTop="";
function PanoImageController()
{
ActualYaw = Math.round(PanoramaA.getYaw());
ActualHFOV = Math.round(PanoramaA.getHfov());
if (ActualYaw > -1 && ActualYaw < 90 && LastTop!="D")
{
document.getElementById('panoramaD').style.zIndex="20";
document.getElementById('panoramaD').style.left="0%";
document.getElementById('panoramaA').style.zIndex="20";
document.getElementById('panoramaA').style.left="50%";
document.getElementById('panoramaB').style.zIndex="10";
document.getElementById('panoramaC').style.zIndex="10";
LastTop="D";
}
if (ActualYaw > 90 && ActualYaw < 180 && LastTop!="A")
{
document.getElementById('panoramaA').style.zIndex="20";
document.getElementById('panoramaA').style.left="0%";
document.getElementById('panoramaB').style.zIndex="20";
document.getElementById('panoramaB').style.left="50%";
document.getElementById('panoramaC').style.zIndex="10";
document.getElementById('panoramaD').style.zIndex="10";
LastTop="A";
}
if (ActualYaw > -180 && ActualYaw < -90 && LastTop!="B")
{
document.getElementById('panoramaB').style.zIndex="20";
document.getElementById('panoramaB').style.left="0%";
document.getElementById('panoramaC').style.zIndex="20";
document.getElementById('panoramaC').style.left="50%";
document.getElementById('panoramaA').style.zIndex="10";
document.getElementById('panoramaD').style.zIndex="10";
LastTop="B";
}
if (ActualYaw > -90 && ActualYaw < 0 && LastTop!="C")
{
document.getElementById('panoramaC').style.zIndex="20";
document.getElementById('panoramaC').style.left="0%";
document.getElementById('panoramaD').style.zIndex="20";
document.getElementById('panoramaD').style.left="50%";
document.getElementById('panoramaA').style.zIndex="10";
document.getElementById('panoramaB').style.zIndex="10";
LastTop="C";
}
var repeatPanoImageController=setTimeout(PanoImageController, 500)
}
</script>
</HEAD>
<BODY onload="PanoImageController()">
<div id="panoramaA"></div>
<div id="panoramaB"></div>
<div id="panoramaC"></div>
<div id="panoramaD"></div>
<div id="OverTheTop"><div>
<script>
PanoramaA = pannellum.viewer('panoramaA', {"type": "equirectangular","panorama": "Church_HDR_x4_000.jpg","autoLoad": true,"orientationOnByDefault":true,"yaw":0,"showControls":false});
PanoramaB = pannellum.viewer('panoramaB', {"type": "equirectangular","panorama": "Church_HDR_x4_090.jpg","autoLoad": true,"orientationOnByDefault":true,"yaw":0,"showControls":false});
PanoramaC = pannellum.viewer('panoramaC', {"type": "equirectangular","panorama": "Church_HDR_x4_180.jpg","autoLoad": true,"orientationOnByDefault":true,"yaw":0,"showControls":false});
PanoramaD = pannellum.viewer('panoramaD', {"type": "equirectangular","panorama": "Church_HDR_x4_270.jpg","autoLoad": true,"orientationOnByDefault":true,"yaw":0,"showControls":false});
</script>
</BODY>
</HTML>