-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
139 lines (119 loc) · 4.25 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
135
136
137
138
139
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Audio Visualization">
<title>Audio Visualization</title>
<link href="https://fonts.googleapis.com/css?family=Jura:500" rel="stylesheet">
<script src="https://aframe.io/releases/0.5.0/aframe.min.js"></script>
<script src="https://unpkg.com/aframe-event-set-component@3.x.x/dist/aframe-event-set-component.min.js"></script>
<script src="https://connect.soundcloud.com/sdk.js"></script>
<script src="src/js/pulse.js"></script>
<script src="src/js/Music.js"></script>
<script src="src/js/SoundCloud.js"></script>
<script src="src/js/song.js"></script>
<style>
audio {
position: absolute;
top: 0;
left: 0;
z-index: 1000;
width: 100px;
height: 30px;
}
#overlay {
visibility: hidden;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.8);
color: #FFF;
z-index: 100;
font-family: 'Jura', sans-serif;
font-weight: 500;
font-size: 1.6rem;
display: flex;
justify-content: center;
align-items: center;
@media(max-width: 600px) {
visibility: visible;
}
}
@media screen and (max-width: 720px) {
#overlay {
visibility: visible;
}
}
</style>
</head>
<body>
<audio preload autobuffer></audio>
<div id="overlay">Click to start</div>
<a-scene>
<!-- 360-degree image. -->
<a-sky color="#102E37"></a-sky>
<!-- song selection -->
<a-plane
song="url: https://soundcloud.com/user-178389268/minimaltech-before-after-mastering-monarchmasteringcom"
color="#F50057"
height="2"
width="4"
position="-10 0 0"
rotation="0 90 0"
event-set__1="_event: mousedown; scale: 1 1 1"
event-set__2="_event: mouseup; scale: 1.2 1.2 1"
event-set__3="_event: mouseenter; scale: 1.2 1.2 1; color: #FF5722"
event-set__4="_event: mouseleave; scale: 1 1 1; color: #F50057">
<a-text anchor="center" font="dejavu" width="7" align="center" value="MinimalTech"></a-text>
</a-plane>
<a-plane
song="url: https://soundcloud.com/aritusmusic/aritus-keep-1"
color="#F50057"
height="2"
width="4"
position="-10 2.5 0"
rotation="0 90 0"
event-set__1="_event: mousedown; scale: 1 1 1"
event-set__2="_event: mouseup; scale: 1.2 1.2 1"
event-set__3="_event: mouseenter; scale: 1.2 1.2 1; color: #FF5722"
event-set__4="_event: mouseleave; scale: 1 1 1; color: #F50057">
<a-text anchor="center" font="dejavu" width="7" align="center" value="Aritus"></a-text>
</a-plane>
<a-plane
song="url: https://soundcloud.com/rlgrime/the-hills-rl-grime-remix"
color="#F50057"
height="2"
width="4"
position="-10 5 0"
rotation="0 90 0"
event-set__1="_event: mousedown; scale: 1 1 1"
event-set__2="_event: mouseup; scale: 1.2 1.2 1"
event-set__3="_event: mouseenter; scale: 1.2 1.2 1; color: #FF5722"
event-set__4="_event: mouseleave; scale: 1 1 1; color: #F50057">
<a-text anchor="center" font="dejavu" width="7" align="center" value="The Hills"></a-text>
</a-plane>
<!-- Camera + Cursor. -->
<a-camera>
<a-cursor id="cursor" color="#FFEB3B";>
<a-animation begin="click" easing="ease-in" attribute="scale"
fill="backwards" from="0.1 0.1 0.1" to="1 1 1" dur="150">
</a-animation>
<a-animation begin="cursor-fusing" easing="ease-in" attribute="scale"
from="1 1 1" to="0.1 0.1 0.1" dur="1500">
</a-animation>
</a-cursor>
</a-camera>
</a-scene>
<script src="src/js/main.js"></script>
<script type="text/javascript">
const overlay = document.getElementById('overlay');
overlay.addEventListener('click', function() {
overlay.style.visibility = 'hidden';
document.querySelector('audio').play();
})
</script>
</body>
</html>