-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
246 lines (214 loc) · 11.6 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
<!DOCTYPE html>
<!--
MazeWars VR
Copyright (C) 2016 Marcio Teixeira
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU Affero General Public License
as published by the Free Software Foundation; either version 3
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<html prefix="og: http://ogp.me/ns#" lang="en">
<head>
<title>MazeWar VR</title>
<meta name="Description" content="Hide, seek and destroy in this multi-player virtual reality chase game. For smartphones and desktop VR, including Cardboard, GearVR, Oculus Rift and Vive.">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- iOS Webapp Configuration -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<link rel="apple-touch-icon" href="artwork/icon.png">
<!-- Twitter Card data -->
<meta name="twitter:card" content="player">
<meta name="twitter:title" content="Maze War VR">
<meta name="twitter:description" content="Hide, seek and destroy in this virtual reality remake of a 1974 chase game that originated at NASA.">
<meta name="twitter:image" content="https://www.marciot.com/mazewar-vr/artwork/fb-share.jpg">
<meta name="twitter:url" content="https://www.marciot.com/mazewar-vr/">
<meta name="twitter:player" content="https://www.youtube.com/embed/iemJnNFq3r4">
<meta name="twitter:player:width" content="1280">
<meta name="twitter:player:height" content="720">
<!-- Facebook Open Graph Markup -->
<meta property="og:url" content="https://www.marciot.com/mazewar-vr/" />
<meta property="og:video" content="https://www.youtube.com/v/iemJnNFq3r4" />
<meta property="og:type" content="article" />
<meta property="og:title" content="Maze War VR" />
<meta property="og:description" content="Hide, seek and destroy in this virtual reality remake of a 1974 chase game that originated at NASA." />
<meta property="og:image" content="https://www.marciot.com/mazewar-vr/artwork/fb-share.jpg" />
<meta property="og:image:url" content="https://www.marciot.com/mazewar-vr/artwork/fb-share.jpg" />
<meta property="og:image:secure_url" content="https://raw.githubusercontent.com/marciot/mazewar-vr/master/artwork/fb-share.jpg">
<meta property="og:image:type" content="image/jpg" />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />
<meta property="fb:app_id" content="2110357839189822" />
<!-- End of Facebook Open Graph Markup -->
<!-- During development, the code is changing often and it may be useful not to cache things -->
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate"/>
<meta http-equiv="Pragma" content="no-cache"/>
<meta http-equiv="Expires" content="0"/>
<style>
html, body {
margin: 0;
padding 0;
overflow: hidden;
width: 100%;
height: 100%;
}
body {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
}
* {
-webkit-user-select: none;
-ms-user-select: none;
-moz-user-select: none;
user-select: none;
-webkit-touch-callout: none;
-moz-touch-callout: none;
-ms-touch-callout: none;
touch-callout: none;
-webkit-tap-highlight-color: rgba(0,0,0,0);
}
.allow-selection {
-webkit-user-select: text;
-ms-user-select: text;
-moz-user-select: text;
user-select: text;
-webkit-touch-callout: default;
-moz-touch-callout: default;
-ms-touch-callout: default;
touch-callout: default;
}
</style>
<!-- We use YConsole to help debugging on mobile devices -->
<script type="text/javascript" src="js/third-party/yconsole-compiled.js"></script>
</head>
<body>
<span id="statusAndError"></span>
<script type="text/javascript">
function mwLog(str) {
document.querySelector("#statusAndError").innerHTML += str + "<br>";
console.log(str);
}
/*window.onerror = function(error) {
YConsole.show();
}*/
YConsole.activate();
YConsole.docking="bottom";
</script>
<script>
function onTouch(e) {
if(e.touches && e.touches.length === 4) {
YConsole.show();
e.preventDefault();
}
}
document.body.addEventListener("touchstart", onTouch);
</script>
<about-box></about-box>
<!-- Cordova CSP Configuration:
Note: This normally goes in the head, but when running under PhoneGap App, the meta tag in head
appears to get overwritten. Placing it here seems to be a workaround.
-->
<!--
<meta http-equiv="Content-Security-Policy" content="default-src * gap://ready file:; script-src 'unsafe-inline' 'unsafe-eval' * data: file:; style-src 'self' 'unsafe-inline'; connect-src *">
<script type="text/javascript" src="cordova.js"></script>
-->
<!-- For some reason using the full webcomponents library breaks WebGL on iOS -->
<script type="text/javascript" src="js/third-party/webcomponents/webcomponents-lite.min.js"></script>
<!-- Networking Code -->
<script type="text/javascript" src="js/third-party/peerjs/peer-modified.js"></script>
<script type="text/javascript" src="js/dist-ecma5/networking/cordova-setup.js?v=1"></script>
<link rel="import" href="js/SwipePages.html?v=1"></link>
<link rel="import" href="js/AboutBox.html?v=1"></link>
<!-- Library Code -->
<script>
WebVRConfig = {
ROTATE_INSTRUCTIONS_DISABLED: true,
ALWAYS_APPEND_POLYFILL_DISPLAY: true
};
</script>
<script type="text/javascript" src="js/third-party/promise-7.0.4.min.js"></script>
<script type="text/javascript" src="js/third-party/webvr-polyfill/webvr-polyfill.js"></script>
<script type="text/javascript" src="js/third-party/threejs/three.js"></script>
<script type="text/javascript" src="js/third-party/threejs/VREffect.js"></script>
<!-- Library Code -->
<script type="text/javascript" src="js/third-party/fastclick.js"></script>
<script type="text/javascript" src="js/third-party/tween-functions.js"></script>
<script type="text/javascript" src="js/third-party/threejs/AnaglyphEffect.js"></script>
<!-- Shader programs for skydome -->
<script type="application/x-glsl" id="sky-vertex">
varying vec2 vUV;
void main() {
vUV = uv;
vec4 pos = vec4(position, 1.0);
gl_Position = projectionMatrix * modelViewMatrix * pos;
}
</script>
<script type="application/x-glsl" id="sky-fragment">
uniform sampler2D texture;
varying vec2 vUV;
void main() {
vec4 sample = texture2D(texture, vUV);
gl_FragColor = vec4(sample.xyz, sample.w);
}
</script>
<script type="application/x-glsl" id="sky-fragment-symmetric">
uniform sampler2D texture;
varying vec2 vUV;
void main() {
vec2 vUVreflected = (vUV.y < 0.5)
? vec2( vUV.x, 1.0 - (vUV.y * 2.0))
: vec2(1.0 - vUV.x, -1.0 + (vUV.y * 2.0));
vec4 sample = texture2D(texture, vUVreflected);
gl_FragColor = vec4(sample.xyz, sample.w);
}
</script>
<!-- Main Program -->
<script type="text/javascript" src="js/dist-ecma5/networking/frame-utilities.js?v=1"></script>
<script type="text/javascript" src="js/dist-ecma5/networking/pup-services.js?v=1"></script>
<script type="text/javascript" src="js/dist-ecma5/networking/pup-services-mazewar.js?v=1"></script>
<script type="text/javascript" src="js/dist-ecma5/networking/retroweb-network.js?v=1"></script>
<script type="text/javascript" src="js/dist-ecma5/Directions.js?v=1"></script>
<script type="text/javascript" src="js/dist-ecma5/Maze.js?v=1"></script>
<script type="text/javascript" src="js/dist-ecma5/Actors.js?v=1"></script>
<script type="text/javascript" src="js/dist-ecma5/GamePadController.js?v=1"></script>
<script type="text/javascript" src="js/dist-ecma5/Directors.js?v=1"></script>
<script type="text/javascript" src="js/dist-ecma5/Tween.js?v=1"></script>
<script type="text/javascript" src="js/dist-ecma5/MotionTracker.js?v=1"></script>
<script type="text/javascript" src="js/dist-ecma5/WebAudio.js?v=1"></script>
<script type="text/javascript" src="js/dist-ecma5/WebGLText.js?v=1"></script>
<script type="text/javascript" src="js/dist-ecma5/WebGLActors.js?v=1"></script>
<script type="text/javascript" src="js/dist-ecma5/WebGLScene.js?v=1"></script>
<script type="text/javascript" src="js/dist-ecma5/GameMaster.js?v=1"></script>
<script type="text/javascript" src="js/dist-ecma5/Main.js?v=1"></script>
<!-- Note: Something in here conflicts with ioswebrtc, disable when compiling for iOS -->
<link rel="import" href="extras/contralto-js/alto-emulator.html?v=1"></link>
<!--
I host SDK keys in a separate web server so they don't end up on GitHub.
If you forked this project, you should generate your own API keys.
-->
<script crossorigin="anonymous" type="text/javascript" src="https://webrtc.marciot.com:4443/sdk-keys/sdk-keys-mazewar-vr.js?v=1"></script>
<script>
if(typeof fbAsyncInit === "undefined" || typeof RetroWeb.peerJSConfig === "undefined") {
alert("For full functionality, provide your own API keys for Facebook and Peer.js");
}
</script
<!-- Google Analytics -->
<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-47856782-3', 'auto');
ga('send', 'pageview');
</script>
</body>
</html>