-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
134 lines (107 loc) · 5.02 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
134
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Hubble Tonal Recall</title>
<meta name="description" content="2018 Space Apps Challenge">
<script src="js/aframe.min.js"></script>
<link rel="stylesheet" href="css/animate.css" />
<link rel="stylesheet" href="css/style.css" />
</head>
<body>
<audio id="player"></audio>
<audio id="finale" loop>
<source src="ambient.mp3" />
</audio>
<a-scene>
<!--<a-scene vr-mode-ui="enabled: false">-->
<!-- preload assets -->
<a-assets>
<img id="pano" src="assets/stars1.jpg">
<img id="level01" src="assets/thumb01.png">
<img id="level02" src="assets/thumb02.png">
<img id="level03" src="assets/thumb03.png">
<img id="level04" src="assets/thumb04.png">
<img id="level05" src="assets/thumb05.png">
<img id="level06" src="assets/thumb06.png">
<img id="stars0" src="assets/star0.png">
<img id="stars1" src="assets/star1.png">
<img id="stars2" src="assets/star2.png">
<img id="stars3" src="assets/star3.png">
<img id="sun" src="assets/sun.png">
<a-asset-item id="hubble-obj" src="assets/hubble.obj"></a-asset-item>
</a-assets>
<!-- Using the asset management system. -->
<a-sphere src="assets/earth.jpg" position="0 -1.5 -1.75" radius="1" color="#FFFFFF">
<a-animation attribute="rotation"
dur="450000"
to="0 360 0"
easing= "linear"
repeat="indefinite">
</a-animation>
</a-sphere>
<a-obj-model src="#hubble-obj" position="0 -0.35 -1.2" scale="0.01 0.01 0.01" rotation="15 120 0"></a-obj-model>
<!-- Hubble Image Selectors -->
<a-image id="level01Game" src="#level01" width="20" height="20" position="13 -2 -22" rotation="0 -22 0" scale="0.2 0.2 0.2"></a-image>
<a-image id="level01Stars" src="#stars3" width="18" height="5" position="13 -5 -22" rotation="0 -22 0" scale="0.2 0.2 0.2"></a-image>
<a-image id="level02Game" src="#level02" width="20" height="20" position="-35 10 -15" rotation="0 65 0" scale="0.3 0.3 0.3"></a-image>
<a-image id="level02Stars" src="#stars0" width="18" height="5" position="-35 6 -15" rotation="0 65 0" scale="0.3 0.3 0.3"></a-image>
<a-image id="level03Game" src="#level03" width="20" height="20" position="-28 22 18" rotation="15 -240 0" scale="0.3 0.3 0.3"></a-image>
<a-image id="level03Stars" src="#stars1" width="18" height="5" position="-28 17 18" rotation="15 -240 0" scale="0.3 0.3 0.3"></a-image>
<a-image id="level04Game" src="#level04" width="20" height="20" position="2 -26 30" rotation="-20 180 0" scale="0.3 0.3 0.3"></a-image>
<a-image id="level04Stars" src="#stars0" width="18" height="5" position="2 -31 30" rotation="-20 180 0" scale="0.3 0.3 0.3"></a-image>
<a-image id="level05Game" src="#level05" width="20" height="20" position="26 -9 15" rotation="-10 240 0" scale="0.3 0.3 0.3"></a-image>
<a-image id="level05Stars" src="#stars0" width="18" height="5" position="26 -14 15" rotation="-10 240 0" scale="0.3 0.3 0.3"></a-image>
<a-image id="level06Game" src="#level06" width="20" height="20" position="25 28 -13" rotation="15 -60 0" scale="0.3 0.3 0.3"></a-image>
<a-image id="level06Stars" src="#stars2" width="18" height="5" position="25 23 -13" rotation="15 -60 0" scale="0.3 0.3 0.3"></a-image>
<!-- Sun -->
<a-image id="sol" src="#sun" width="4" height="4" position="8 -7 -10" rotation="0 0 0" scale="0.5 0.5 0.5"></a-image>
<!-- lights/sky/camera -->
<a-light type="spot" color="#333" position="-20 0 0"></a-light>
<a-light type="point" color="#AAA" position="0 5 0"></a-light>
<a-sky src="#pano">
</a-sky>
<!-- Linticular -->
<a-entity position="0 0 0">
<a-camera>
<a-cursor color="#fff" fuse="true" timeout="1500"></a-cursor>
</a-camera>
</a-entity>
</a-scene>
<div id="lobby" >
</div>
<script>
// button scripts
var ht = document.querySelector('#level01Game');
var sd = document.querySelector('#level02Game');
var sc = document.querySelector('#level03Game');
var sp = document.querySelector('#level04Game');
var cr = document.querySelector('#level05Game');
var fl = document.querySelector('#level06Game');
var sn = document.querySelector('#sol');
// linked in url
ht.addEventListener('click', function () {
window.open("level01/index.html", "_self");
});
sd.addEventListener('click', function () {
window.open("level02/index.html", "_self");
});
sc.addEventListener('click', function () {
window.open("level03/index.html", "_self");
});
sp.addEventListener('click', function () {
window.open("level04/index.html", "_self");
});
cr.addEventListener('click', function () {
window.open("level05/index.html", "_self");
});
fl.addEventListener('click', function () {
window.open("level06/index.html", "_self");
});
sn.addEventListener('click', function () {
window.open("credits/index.html", "_self");
});
</script>
</script>
</body>
</html>