-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
316 lines (289 loc) · 14.1 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
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
<!DOCTYPE html>
<html>
<head>
<title>Space Rocks (WebXR)</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<meta name="description" content="Escape through space on stolen plasma engines while slinging photon bolts at deadly asteroids.">
<meta name="copyright" content="Moar Technologies Corp 2017, 2018 http://moar.io">
<meta name="keywords" content="
Virtual Reality, VR, Augmented Reality, AR, Mixed Reality, MR, XR,
WebVR, WebXR, WebGL, Canvas, HTML5, SVG, JavaScript, GPU, shader, vertex, fragment,
Mozilla Firefox, Firefox, Google Chrome, Chrome, Microsoft Edge, Edge, Webkit, Blink, Chromium,
Three, Three.js, ThreeJS, VRController, TaskList,
Oculus, Oculus Rift, Oculus Touch, HTC Vive, Steam, SteamVR, Windows Mixed Reality,
Atari, Asteroids, Tempest, video game, vintage, retro,
Moar Technologies Corp, Moar, Stewart Smith, Stewart,
Brooklyn, NY, NYC, New York, New York City">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@moar_tech">
<meta name="twitter:creator" content="@stew_rtsmith">
<meta name="twitter:description" content="Escape through space on stolen plasma engines while slinging photon bolts at deadly asteroids.">
<meta name="twitter:title" content="Space Rocks (WebXR)">
<meta name="twitter:image" content="https://spacerocks.moar.io/media/space-rocks.jpg">
<meta name="twitter:url" content="https://spacerocks.moar.io">
<meta property="og:type" content="website">
<meta property="og:description" content="Escape through space on stolen plasma engines while slinging photon bolts at deadly asteroids.">
<meta property="og:title" content="Space Rocks (WebXR)">
<meta property="og:image" content="https://spacerocks.moar.io/media/space-rocks.jpg">
<meta property="og:url" content="https://spacerocks.moar.io">
<link rel="canonical" href="https://spacerocks.moar.io">
<link rel="icon" type="image/png" href="media/favicon-064.png">
<link rel="apple-touch-icon" href="media/favicon-144.png">
<link rel="stylesheet" href="styles/base.css" type="text/css">
<!-- Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-86306006-3"></script>
<script>
window.dataLayer = window.dataLayer || []
function gtag(){ dataLayer.push( arguments )}
gtag( 'js', new Date() )
gtag( 'config', 'UA-86306006-3' )
</script>
<!-- Third-Party -->
<script src="scripts/third-party/three-r88-min.js"></script>
<script src="scripts/third-party/VRController.js"></script>
<script src="scripts/third-party/TaskLists.js"></script>
<script src="scripts/third-party/Mode.js"></script>
<!-- Moar -->
<script src="scripts/moar/tasks.js"></script>
<script src="scripts/moar/stats.js"></script>
<script src="scripts/moar/detect.js"></script>
<script src="scripts/moar/utils.js"></script>
<script src="scripts/moar/three.js"></script>
<!-- Space Rocks -->
<script src="scripts/main.js"></script>
<script src="scripts/Quicktext.js"></script>
<script src="scripts/player.js"></script>
<script src="scripts/Bolt.js"></script>
<script src="scripts/Rock.js"></script>
<script src="scripts/Explosion.js"></script>
<script src="scripts/Button.js"></script>
<script src="scripts/Jumbotron.js"></script>
</head>
<body>
<div id="three"></div>
<div id="three-ui">
<div id="underline">
<svg class="svg-symbol" role="img" title="Space Rocks">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="media/vectors.svg#space-rocks-underline"></use>
</svg>
</div>
<div id="errors">
<svg class="svg-symbol" role="img" title="Error">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="media/vectors.svg#error"></use>
</svg>
<strong>
Slow down, Space Pirate!
Before you can blast asteroids out of orbit you need to:
</strong>
<div id="no-webgl">
Upgrade to a Web browser that supports
<a target="_blank" href="https://en.wikipedia.org/wiki/WebGL">WebGL</a>,
like the latest version of
<a target="_blank" href="https://www.mozilla.org/firefox/">Firefox</a>,
<a target="_blank" href="https://webvr.rocks/chromium">Chromium</a>, or
<!-- <a target="_blank" href="https://www.google.com/chrome/">Chrome</a>, or -->
<a target="_blank" href="https://www.microsoft.com/windows/microsoft-edge">Edge</a>.
</div>
<div id="no-webvr">
Upgrade to a Web browser that supports
the <a target="_blank" href="https://en.wikipedia.org/wiki/WebVR">WebVR API</a>,
like the latest version of
<a target="_blank" href="https://www.mozilla.org/firefox/">Firefox</a>,
<a target="_blank" href="https://webvr.rocks/chromium">Chromium</a>, or
<!-- <a target="_blank" href="https://www.google.com/chrome/">Chrome</a>, or -->
<a target="_blank" href="https://www.microsoft.com/windows/microsoft-edge">Edge</a>.
</div>
<div id="no-hmd">
Attach a virtual reality headset to your computer,
such as an
<a target="_blank" href="https://www.oculus.com/rift/">Oculus Rift</a>,
<a target="_blank" href="https://www.vive.com/">HTC Vive</a>, or
<a target="_blank" href="https://www.microsoft.com/en-us/windows/windows-mixed-reality">Windows Mixed Reality</a> device.
</div>
<div id="no-6dof">
Upgrade to a virtual reality headset that tracks both position and orientation,
such as an
<a target="_blank" href="https://www.oculus.com/rift/">Oculus Rift</a>,
<a target="_blank" href="https://www.vive.com/">HTC Vive</a>, or
<a target="_blank" href="https://www.microsoft.com/en-us/windows/windows-mixed-reality">Windows Mixed Reality</a> device.
</div>
</div>
<div id="high-score">High score: <span id="high-score-number">0</span></div>
<div id="vr-toggle-container">
<div id="vr-toggle-off">
Enter VR
</div>
<div id="vr-toggle-on">
<svg class="svg-symbol" role="img">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="media/vectors.svg#moar-mark"></use>
</svg>
<p>Put on headset</p>
</div>
</div>
</div>
<div id="scroller" >
<div id="column-1" class="column">
<section id="about" class="anchor" label="About" hash="about">
<strong>Escape through space on stolen plasma engines while slinging photon bolts at deadly asteroids.</strong>
How many can you blow apart?
Put on your virtual reality headset and pick up your hand controllers.
You’ll need them if you want to survive.
</section>
<section id="instructions" class="anchor" label="Instructions" hash="instructions">
<h2>Instructions</h2>
<div class="illustration">
<svg id="trigger-released" class="svg-symbol" role="img" title="Oculus Touch trigger released">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="media/vectors.svg#trigger-released"></use>
</svg>
<svg id="trigger-pressed" class="svg-symbol" role="img" title="Oculus Touch trigger pressed">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="media/vectors.svg#trigger-pressed"></use>
</svg>
<svg class="svg-symbol" role="img" title="Oculus Touch trigger">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="media/vectors.svg#trigger-base"></use>
</svg>
</div>
<p>
Pull your trigger to sling photon bolts.
And watch out for that accumulated recoil.
</p>
<div class="illustration">
<svg class="svg-symbol" role="img" title="Oculus Touch grip">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="media/vectors.svg#grip-base"></use>
</svg>
<svg id="grip-released" class="svg-symbol" role="img" title="Oculus Touch grip released">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="media/vectors.svg#grip-released"></use>
</svg>
<svg id="grip-pressed" class="svg-symbol" role="img" title="Oculus Touch grip pressed">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="media/vectors.svg#grip-pressed"></use>
</svg>
</div>
<p>
Press your side grips to rev your plasma engines.
Careful: you may be going faster than you think.
(And slowing down takes some talent.)
</p>
</section>
</div>
<div id="column-2" class="column">
<section id="requirements" class="anchor" label="Requirements" hash="requirements">
<h2>Requirements</h2>
You’ll need a position-tracking virtual reality rig with two hand controllers,
and a WebVR-capable browser.
Right now in 2017 the most expensive part is the computer needed to run a room-scale VR rig,
but take heart—by 2022 all of this hardware will be much cheaper.
And the Web will still be free.
In the meantime here’s what Space Rocks is tuned to run on:
<table id="compatability-table">
<tr>
<td> </td>
<td><a target="_blank" href="https://www.oculus.com/rift/">
<svg class="svg-symbol" role="img" title="Oculus Rift">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="media/vectors.svg#oculus"></use>
</svg><br>
Oculus
</a></td>
<td><a target="_blank" href="https://www.vive.com/">
<svg class="svg-symbol" role="img" title="HTC Vive">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="media/vectors.svg#vive"></use>
</svg><br>
Vive
</a></td>
<td><a target="_blank" href="https://www.microsoft.com/en-us/windows/windows-mixed-reality">
<svg class="svg-symbol" role="img" title="Windows Mixed Reality">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="media/vectors.svg#windows-mixed-reality"></use>
</svg><br>
Win MR
</a></td>
</tr>
<tr>
<td><a target="_blank" href="https://www.mozilla.org/firefox/">
<svg class="svg-symbol" role="img" title="Mozilla Firefox">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="media/vectors.svg#firefox"></use>
</svg><br>
Firefox
</a></td>
<td>
<svg class="svg-symbol" role="img" title="Checkmark">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="media/vectors.svg#checkmark"></use>
</svg>
</td>
<td>
<svg class="svg-symbol" role="img" title="Checkmark">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="media/vectors.svg#checkmark"></use>
</svg>
</td>
<td>×</td>
</tr>
<tr>
<td><a target="_blank" href="https://www.google.com/chrome/browser/canary.html">
<svg class="svg-symbol" role="img" title="Google Chrome">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="media/vectors.svg#chrome"></use>
</svg><br>
Chrome
</a></td>
<td>×</td>
<td>
<svg class="svg-symbol" role="img" title="Checkmark">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="media/vectors.svg#checkmark"></use>
</svg>
</td>
<td>×</td>
</tr>
<tr>
<td><a target="_blank" href="https://www.microsoft.com/windows/microsoft-edge">
<svg class="svg-symbol" role="img" title="Microsoft Edge">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="media/vectors.svg#edge"></use>
</svg><br>
Edge
</a></td>
<td>×</td>
<td>×</td>
<td>
<svg class="svg-symbol" role="img" title="Checkmark">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="media/vectors.svg#checkmark"></use>
</svg>
</td>
</tr>
</table>
</section>
<section id="colophon" class="anchor" label="Colophon" hash="colophon">
<h2>Colophon</h2>
<p>
Space Rocks is a WebVR experiment created by me,
<a target="_blank" href="http://stewartsmith.io">Stewart Smith</a>,
and brought to you by <a target="_blank" href="https://moar.io">Moar Technologies Corp</a>,
a consultancy for emerging technology and strategy in Brooklyn, New York.
Built with <a target="_blank" href="https://github.com/stewdio/THREE.VRController">VRController</a> for Three.js.
Display typeface: <a target="_blank" href="https://www.myfonts.com/fonts/sentinel/big-noodle-titling/">Big Noodle Titling</a> by James Arboghast for Sentinel Type.
Body typeface: <a target="_blank" href="https://fonts.google.com/specimen/Roboto">Roboto</a> by Christian Robertson for Google.
</p>
<p>
Many thanks to everyone who has helped to make WebVR possible,
from the hardware teams to the browser teams, to the framework developers, and everyone in between.
And a very special thanks to Lyle, Ed, Dominic, and whoever else had a hand in making
<a target="_blank" href="https://en.wikipedia.org/wiki/Asteroids_(video_game)">Atari’s Asteroids (1979)</a>
which was a childhood favorite of mine and an obvious influence here.
</p>
<br>
<p>
Copyright © <a target="_blank" href="https://moar.io">Moar Technologies Corp</a> 2017. All Rights Reserved.
See <a href="https://github.com/moar-io/spacerocks" target="_blank">license</a> for details.
</p>
</section>
</div>
<footer>
<a target="_blank" href="https://moar.io">
<svg id="moar" class="svg-symbol" role="img" title="Moar Technologies Corp">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="media/vectors.svg#moar"></use>
</svg>
</a><br>
</footer>
</div>
<h1>
<svg class="svg-symbol" role="img" title="Space Rocks">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="media/vectors.svg#space-rocks"></use>
</svg>
</h1>
</body>
</html>