forked from github/game-off-2012
-
Notifications
You must be signed in to change notification settings - Fork 4
/
index-mobile.html
executable file
·82 lines (69 loc) · 2.26 KB
/
index-mobile.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
<!DOCTYPE html>
<html>
<head>
<title>Jetman Jr</title>
<link rel="Shortcut Icon" href="/favicon.ico" />
<style type="text/css">
html,body {
background-color: #000;
color: #fff;
font-family: helvetica, arial, sans-serif;
margin: 0;
padding: 0;
font-size: 12pt;
min-height: 416px;
position: relative;
}
#canvas {
image-rendering: optimizeSpeed;
-webkit-interpolation-mode: nearest-neighbor;
}
@media screen and (-webkit-min-device-pixel-ratio:2){
#canvas {
width: 320px;
height: 320px;
}
}
.button {
background-image: url(media/iphone-buttons.png);
background-repeat: no-repeat;
width: 80px;
height: 96px;
position: absolute;
bottom: 0px;
-webkit-touch-callout: none;
-webkit-user-select: none;
-webkit-tap-highlight-color: rgba(0,0,0,0);
-webkit-text-size-adjust: none;
}
#buttonFPS { position: absolute; top: 0; left: 0; width: 32px; height: 32px; }
#buttonLeft { left: 0; background-position: 0, 0; border: 1px}
#buttonRight { left: 80px; background-position: -80px, 0; }
#buttonShoot { right: 80px; background-position: -160px, 0; }
#buttonJump { right: 40px; background-position: -200px, 0; }
#buttonDynamite { right: 0px; background-position: -240px, 0; }
#game {
text-align: center;
}
</style>
<link rel="apple-touch-icon" href="media/touch-icon.png"/>
<meta name="viewport" content="width=320; initial-scale=1; maximum-scale=1; user-scalable=0;"/>
<meta name="apple-mobile-web-app-capable" content="yes" />
<script type="text/javascript" src="lib/impact/impact.js"></script>
<script type="text/javascript" src="lib/game/main.js"></script>
</head>
<body onload="window.scrollTo(0,1);">
<div id="game">
<canvas id="canvas"></canvas>
<!--<div class="button" id="buttonLeft"></div>
<div class="button" id="buttonRight"></div>
<div class="button" id="buttonShoot"></div>
<div class="button" id="buttonJump"></div>
<div class="button" id="buttonDynamite"></div>
-->
</div>
<script type="text/javascript">
document.body.addEventListener('touchmove', function(e) { e.preventDefault(); window.scrollTo(0,1); }, false);
</script>
</body>
</html>