Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
109 lines (102 loc) · 5.52 KB
/
Copy pathindex.html
File metadata and controls
109 lines (102 loc) · 5.52 KB
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
<!DOCTYPE html>
<html>
<title>dkdoes</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<!--<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">-->
<head>
<script src="https://ajax.googleapis.com/ajax/libs/threejs/r76/three.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/cannon.js/0.6.2/cannon.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tween.js/r14/Tween.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/fastclick/1.0.6/fastclick.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/howler/2.0.1/howler.min.js"></script>
<link href="https://fonts.googleapis.com/css?family=Roboto:300" rel="stylesheet">
<script src="game.js"></script>
<style>
body {
margin: 0px;
width: 100%;
overflow: hidden;
position: absolute;
}
h1, h2, h3, h4, h5, h6 {
font-family: 'Roboto';
}
p, div {
font-family: 'Roboto';
}
.modal {
text-align: center;
padding: 0!important;
}
.modal:before {
content: '';
display: inline-block;
height: 100%;
vertical-align: middle;
margin-right: -4px;
}
.modal-dialog {
display: inline-block;
text-align: left;
vertical-align: middle;
}
</style>
</head>
<body>
<div class="container">
<div class="row">
<!--
<button type="button" id="makeCube" class="btn btn-primary btn-lg"><span class="glyphicon glyphicon-plus"></span></button>
-->
<button type="button" id="changeColor" class="btn btn-primary btn-lg"><span class="glyphicon glyphicon-tint"></span></button>
<!--
<button type="button" id="refresh" class="btn btn-danger btn-lg"><span class="glyphicon glyphicon-refresh"></span></button>
-->
<a href="#controls" class="btn btn-info btn-lg" data-toggle="collapse"><span class="glyphicon glyphicon-question-sign"></span></a>
<div id="controls" class="collapse"><u>DESKTOP CONTROLS:</u><br>WASD to move<br>spacebar to jump<br>click on cubes<br><br><u>MOBILE CONTROLS:</u><br>drag to move<br>tap with two fingers to jump<br>tap on cubes</div>
<div id="test"></div>
</div>
<div class="modal fade intro" id="intro" role="dialog">
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">Welcome</h4>
</div>
<div class="modal-body">
<p id="introText">
<script>
function webgl_support(){
try{
var canvas=document.createElement('canvas')
return !!window.WebGLRenderingContext&&(canvas.getContext('webgl')||canvas.getContext('experimental-webgl'))
}catch(e){return false}
}
if(!webgl_support()){
document.getElementById("introText").innerHTML="This site requires WebGL. Any version of Chrome or Firefox from the last few years should work."
}
else if(/CriOS/.test(navigator.userAgent)){
document.getElementById("introText").innerHTML="It looks like you may be using Chrome on an iPhone/iPad, in which case you could have a few issues with the touch controls. Try Safari or Firefox."}
else{
document.getElementById("introText").innerHTML="If you find any bugs or have any suggestions for improvements, get in touch with me at:<br><ul><li><a href='https://twitter.com/dkdoes'>@dkdoes</a></li><li><a href='mailto:dk@dkdoes.com'>dk@dkdoes.com</a></li><li><a href='https://facebook.com/dkdoes'>facebook.com/dkdoes</a></li></ul>"
}
window.addEventListener("load",function(){
$('#intro').modal('show')
})
</script>
</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-success" data-dismiss="modal">Start</button>
</div>
</div>
</div>
</div>
</div>
</body>
</html>