-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathindex.html
259 lines (228 loc) · 16.4 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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#fff78c">
<title>A-Saturday-Night</title>
<meta name="description" content="A WebVR dancing experience using A-Frame by Mozilla VR.">
<link rel="stylesheet" href="css/main.css">
<script src="https://cdn.rawgit.com/zenorocha/clipboard.js/v1.5.12/dist/clipboard.min.js"></script>
<script src="vendor/aframe.min.js"></script>
<script src="vendor/aframe-motion-capture-components.js"></script>
<script src="vendor/gif.js"></script>
<script src="vendor/download.js"></script>
<script src="vendor/CCapture.min.js"></script>
<script src="https://unpkg.com/aframe-uploadcare-component/dist/aframe-uploadcare-component.min.js"></script>
<script src="build/build.js"></script>
<link rel="manifest" href="manifest.webmanifest">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@mozillavr">
<meta name="twitter:title" content="Check out my moves on aframe.io/a-saturday-night!">
<meta name="twitter:description" content="A-Saturday-Night from Mozilla VR! Share your dance with the world in VR.">
<meta name="twitter:image" id="twitterimg" content="https://aframe.io/a-saturday-night/socialimg.jpg">
<meta property="og:url" content="https://aframe.io/a-saturday-night/">
<meta property="og:type" content="article">
<meta property="og:title" content="Check out my moves on aframe.io/a-saturday-night!">
<meta property="og:description" content="A-Saturday-Night from Mozilla VR! Share your dance with the world in VR.">
<meta property="og:image" id="facebookimg" content="https://aframe.io/a-saturday-night/socialimg.jpg">
<link rel="apple-touch-icon-precomposed" sizes="57x57" href="apple-touch-icon-57x57.png">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="apple-touch-icon-114x114.png">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="apple-touch-icon-72x72.png">
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="apple-touch-icon-144x144.png">
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="apple-touch-icon-120x120.png">
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="apple-touch-icon-152x152.png">
<link rel="icon" type="image/png" sizes="32x32" href="favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.png">
<meta name="application-name" content="A-Saturday-Night">
<meta name="msapplication-TileColor" content="#fff78c">
<meta name="msapplication-TileImage" content="mstile-144x144.png">
</head>
<body>
<div class="instructions-overlay" id="instructions">
<div class="instructions" class="hide">
<img src="assets/logo.png" alt="A-Saturday-Night logo">
<div>
<h2>Show everybody your moves!</h2>
<p>This dance was captured using a VR headset and controllers. <br>
If you have <b>HTC Vive</b> or <b>Oculus Rift</b> you will able to record and upload <br>your dance to <b>share it with everybody!</b> (<a href="https://www.mozilla.org/privacy/">privacy</a> and <a href="https://www.mozilla.org/privacy/websites/#cookies">cookies</a> policy)</a></p>
<p>
<a href="https://blog.mozvr.com/a-saturday-night/">Read more</a>
</p>
</div>
<button class="start-button"><span>Loading...</span></button>
<div class="credits">
<span class="title">Code: </span>
<a href="https://twitter.com/dmarcos">dmarcos</a>, <a href="https://twitter.com/fernandojsg">fernandojsg</a>, <a href="https://twitter.com/feiss">feiss</a>, <a href="https://twitter.com/andgokevin">ngokevin</a> <span class="title">Art: </span><a href="https://twitter.com/feiss">feiss</a> <span class="title">Music: </span><a href="https://soundcloud.com/josss-1">josss</a>
</div>
</div>
</div>
<div id="gif-ui" class="hide black">
<div class="dialog">
<h1>Making GIF, please wait...</h1>
<a href="javascript:;" class="close hide" id="gifclose">×</a>
<img src="assets/loading.gif">
</div>
</div>
<div class="watermark">
<a href="https://aframe.io/a-saturday-night/"><img src="assets/logo-small.png" alt="A-Saturday-Night logo"></a>
</div>
<a-scene uploadcare="publicKey: 85ed3c25d99e387316bd" game-state
avatar-recorder="spectatorPlay: true; spectatorPosition: 0 0 0; localStorage: false; saveFile: false"
auto-enter-vr="enabled: false">
<a-assets timeout="8000">
<img src="assets/room/set.jpg">
<img src="assets/room/tv.png">
<img src="assets/avatar1/avatar1.jpg">
<img src="assets/avatar2/avatar2.jpg">
<img src="assets/avatar2/avatar2spec.jpg">
<img src="assets/avatar3/avatar3.jpg">
<img src="assets/avatar3/avatar3spec.jpg">
<img src="assets/avatar4/avatar4.jpg">
<a-asset-item id="set-obj" src="assets/room/set.gltf"></a-asset-item>
<img src="assets/room/set.jpg">
<a-asset-item id="floor-obj" src="assets/room/floor.gltf"></a-asset-item>
<audio id="avatar1ogg" src="assets/sounds/avatar1.ogg" duration="15"></audio>
<audio id="avatar2ogg" src="assets/sounds/avatar2.ogg" duration="19"></audio>
<audio id="avatar3ogg" src="assets/sounds/avatar3.ogg" duration="17"></audio>
<audio id="avatar4ogg" src="assets/sounds/avatar4.ogg" duration="18"></audio>
<audio id="menuogg" src="assets/sounds/menu.ogg" duration="15"></audio>
<audio id="avatar1mp3" src="assets/sounds/avatar1.mp3" duration="15"></audio>
<audio id="avatar2mp3" src="assets/sounds/avatar2.mp3" duration="19"></audio>
<audio id="avatar3mp3" src="assets/sounds/avatar3.mp3" duration="17"></audio>
<audio id="avatar4mp3" src="assets/sounds/avatar4.mp3" duration="18"></audio>
<audio id="menump3" src="assets/sounds/menu.mp3" duration="15"></audio>
<img id="floor-img" src="assets/room/flooron.png">
<img id="flooroff-mtl" src="assets/room/flooroff.png">
<a-asset-item id="spotlight-obj" src="assets/room/spotlight.gltf"></a-asset-item>
<img id="spotlight-img" src="assets/room/spotlight.png">
<img id="star-img" src="assets/room/star.png">
<a-asset-item id="tv-obj" src="assets/room/tv.gltf"></a-asset-item>
<a-asset-item id="avatar1-head-obj" src="assets/avatar1/avatar1-head.gltf"></a-asset-item>
<a-asset-item id="avatar1-hand-right-obj" src="assets/avatar1/avatar1-hand-right.gltf"></a-asset-item>
<a-asset-item id="avatar1-hand-left-obj" src="assets/avatar1/avatar1-hand-left.gltf"></a-asset-item>
<a-asset-item id="avatar2-head-obj" src="assets/avatar2/avatar2-head.gltf"></a-asset-item>
<a-asset-item id="avatar2-hand-right-obj" src="assets/avatar2/avatar2-hand-right.gltf"></a-asset-item>
<a-asset-item id="avatar2-hand-left-obj" src="assets/avatar2/avatar2-hand-left.gltf"></a-asset-item>
<a-asset-item id="avatar3-head-obj" src="assets/avatar3/avatar3-head.gltf"></a-asset-item>
<a-asset-item id="avatar3-hand-right-obj" src="assets/avatar3/avatar3-hand-right.gltf"></a-asset-item>
<a-asset-item id="avatar3-hand-left-obj" src="assets/avatar3/avatar3-hand-left.gltf"></a-asset-item>
<a-asset-item id="avatar4-head-obj" src="assets/avatar4/avatar4-head.gltf"></a-asset-item>
<a-asset-item id="avatar4-hand-right-obj" src="assets/avatar4/avatar4-hand-right.gltf"></a-asset-item>
<a-asset-item id="avatar4-hand-left-obj" src="assets/avatar4/avatar4-hand-left.gltf"></a-asset-item>
</a-assets>
<a-entity id="cameraRig" rotation="0 0 0">
<a-entity id="avatarHead"
camera="userHeight: 0"
wasd-controls look-controls
visible="false"></a-entity>
<!-- Avatar Hands -->
<a-entity id="leftHand" visible="false"></a-entity>
<a-entity id="rightHand" visible="false"></a-entity>
</a-entity>
<!-- Texts -->
<a-entity id="counter0Text" visible="false" position="0.87 2.18 -2.42" rotation="23.78 -27.40 0" text="font: assets/asaturdaynight.fnt; color: #fffd6a; align:center;width:3.8"></a-entity>
<a-entity id="counter1Text" visible="false" position="-1.66 2.18 2.16" rotation="23.78 147.24 0" text="font: assets/asaturdaynight.fnt; color: #fffd6a; align:center;width:3.8"></a-entity>
<a-entity id="counter0" visible="false" position="0.87 2.18 -2.42" rotation="23.78 -27.40 0" text="font: assets/asaturdaynight.fnt; color: #fffd6a; align:center;width:7.4"></a-entity>
<a-entity id="counter1" visible="false" position="-1.66 2.18 2.16" rotation="23.78 147.24 0" text="font: assets/asaturdaynight.fnt; color: #fffd6a; align:center;width:7.4"></a-entity>
<a-entity id="centeredText" text="font: assets/asaturdaynight.fnt; align: center; opacity: 1; width: 6.22;color:#fffdb3;" visible="false" position="0 1.4 -1"></a-entity>
<a-entity id="collectText" visible="false">
<a-entity text="font: assets/asaturdaynight.fnt; align: center; opacity: 1; width: 3.3;color:#fffdb3;value:Copy your dance URL and share!" position="-1.4 1.25 0" rotation="0 90 0"></a-entity>
<a-entity text="font: assets/asaturdaynight.fnt; align: center; opacity: 1; width: 3.3;color:#fffdb3;value:Copy your dance URL and share!" position="1.6 1.25 0" rotation="0 -90 0"></a-entity>
</a-entity>
<a-entity id="backText" text="font: assets/asaturdaynight.fnt; align: center; opacity: 1; width: 2.8; color:#fffdb3; value:( Turn around )" visible="false" position="0 1.4 2.19" rotation="0 180 0"></a-entity>
<!-- Lights -->
<a-entity id="light0" light="color:#f8b927;intensity:2;type:point;" position="0 -2 0.5"></a-entity>
<a-entity id="light1" light="type:point;color:#ab7121" position="-2.5 2.38 2.7" ></a-entity>
<a-entity id="light2" light="color:#205eff;type:point;" position="2.9 2.29 2.7"></a-entity>
<a-entity id="light3" light="color:#a431f0;type:point;" position="-2.5 2.38 -2.5"></a-entity>
<a-entity id="light4" light="color:#f130cf;intensity:0.66;type:point;" position="3 2.38 -0.61"></a-entity>
<!-- spotlights -->
<a-entity id="spot1" proxy-event="event: dancing" gltf-model="#spotlight-obj" spotlight="color:#ab7121" position="-3.14 2.38 2.7" rotation="44 -38 0" scale="0 0 0">
<a-animation attribute="scale" begin="dancing" to="1 1 1" dur="1000" easing="ease-out-elastic"></a-animation>
</a-entity>
<a-entity id="spot2" proxy-event="event: dancing" gltf-model="#spotlight-obj" spotlight="color:#205eff" position="2.7 2.29 2.7" rotation="50 53 0" scale="0 0 0">
<a-animation attribute="scale" begin="dancing" to="1 1 1" dur="1000" easing="ease-out-elastic"></a-animation>
</a-entity>
<a-entity id="spot3" proxy-event="event: dancing" gltf-model="#spotlight-obj" spotlight="color:#a431f0" position="-3 2.38 -2.5" rotation="-52 60 -13" scale="0 0 0">
<a-animation attribute="scale" begin="dancing" to="1 1 1" dur="1000" easing="ease-out-elastic"></a-animation>
</a-entity>
<a-entity id="spot4" proxy-event="event: dancing" gltf-model="#spotlight-obj" spotlight="color:#f130cf" position="3 2.38 -1.19" rotation="-50 -60 0" scale="0 0 0">
<a-animation attribute="scale" begin="dancing" to="1 1 1" dur="1000" easing="ease-out-elastic"></a-animation>
</a-entity>
<!-- room, floor and TV sets -->
<a-entity id="room" gltf-model="#set-obj" proxy-event="event: dancing" roomcolor="#999" >
<a-entity sound="loop: true" position="0 2 -1"></a-entity>
<a-animation attribute="roomcolor" begin="dancing" to="#FFF" dur="1000" easing="ease-out-elastic"></a-animation>
</a-entity>
<a-entity id="floor" gltf-model="#floor-obj" material="shader:flat;src:#floor-img" discofloor position="0 -0.009 0" rotation="0 -90 0"></a-entity>
<a-image src="#flooroff-mtl" material="repeat: 8 8" rotation="-90 0 0" scale="1.99 1.99 1" position="0 -0.01 0"></a-image>
<a-entity id="tv1" gltf-model="#tv-obj" position="-1.66 2.15 2.18" rotation="0 -33.3 0"></a-entity>
<a-entity id="tv2" gltf-model="#tv-obj" position="0.87 2.15 -2.44" rotation="0 151.8 0"></a-entity>
<!-- Avatar selection -->
<a-entity id="avatarSelection" scale="0.75 0.75 0.75" position="0 1.6 -2" visible="false">
<a-entity id="selectionText" text="font: assets/asaturdaynight.fnt; align: center; opacity: 1; width: 6.22; value:Select your avatar; color:#fffdb3;" position="0 -0.5 0"></a-entity>
<a-entity id="avatar1" class="avatar" rotation="0 180 0">
<a-entity class="head" gltf-model="#avatar1-head-obj" position="1 0 0" highlighter="color:#ff8"></a-entity>
<a-entity class="leftHand" gltf-model="#avatar1-hand-left-obj" visible="false"></a-entity>
<a-entity class="rightHand" gltf-model="#avatar1-hand-right-obj" visible="false"></a-entity>
</a-entity>
<a-entity id="avatar2" class="avatar" rotation="0 180 0">
<a-entity class="head" gltf-model="#avatar2-head-obj" position="0.33 0 0" highlighter="color:#ff0"></a-entity>
<a-entity class="leftHand" gltf-model="#avatar2-hand-left-obj" visible="false"></a-entity>
<a-entity class="rightHand" gltf-model="#avatar2-hand-right-obj" visible="false"></a-entity>
</a-entity>
<a-entity id="avatar3" class="avatar" rotation="0 180 0">
<a-entity class="head" gltf-model="#avatar3-head-obj" position="-0.38 0 0" highlighter="color:#ff0"></a-entity>
<a-entity class="leftHand" gltf-model="#avatar3-hand-left-obj" visible="false"></a-entity>
<a-entity class="rightHand" gltf-model="#avatar3-hand-right-obj" visible="false"></a-entity>
</a-entity>
<a-entity id="avatar4" class="avatar" rotation="0 180 0">
<a-entity class="head" gltf-model="#avatar4-head-obj" position="-1 0 0" highlighter="color:#ff0"></a-entity>
<a-entity class="leftHand" gltf-model="#avatar4-hand-left-obj" visible="false"></a-entity>
<a-entity class="rightHand" gltf-model="#avatar4-hand-right-obj" visible="false"></a-entity>
</a-entity>
</a-entity>
</a-scene>
<div id="asaturday-ui" class="hide dialog">
<div class="progress hide">
Saving dance...
<div class="bar"></div>
</div>
<div class="share hide">
<div class="help">
<h1>Dance saved!</h1>
<p>You now can copy the dance URL, share it or get an animated GIF</p>
</div>
<div class="form">
<a id="sharetwitter" href="#" class="button" target="_blank"><img src="assets/twitter.gif" alt="Share on Twitter"></a>
<a id="sharefacebook" href="#" class="button" target="_blank"><img src="assets/facebook.gif" alt="Share on Facebook"></a>
<input id="asaturday-share-url" type="text" value="" readonly>
<div id="copy-toclipboard" data-clipboard-target="#asaturday-share-url" class="button copy">COPY URL</div>
<a href="javascript:;" class="button" id="generategif">MAKE GIF</a>
</div>
</div>
</div>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-80530812-6', 'auto');
ga('create', 'UA-35433268-69', 'auto', 'managers');
ga('send', 'pageview');
ga('managers.send', 'pageview');
ga('send', 'event', 'pageload.querystring', window.location.search);
ga('managers.send', 'event', 'pageload.querystring', window.location.search);
ga('send', 'event', 'pageload.hash', window.location.hash);
ga('managers.send', 'event', 'pageload.hash', window.location.hash);
ga('send', 'event', 'supports.getVRDisplays', 'getVRDisplays' in navigator);
ga('managers.send', 'event', 'supports.getVRDisplays', 'getVRDisplays' in navigator);
ga('send', 'event', 'supports.navigator.vr', 'vr' in navigator);
ga('managers.send', 'event', 'supports.navigator.vr', 'vr' in navigator);
ga('send', 'event', 'supports.WEBVRPLUS', 'WEBVRPLUS' in window);
ga('managers.send', 'event', 'supports.WEBVRPLUS', 'WEBVRPLUS' in window);
</script>
</body>
</html>