-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
74 lines (71 loc) · 2.87 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>JSPets</title>
<link rel="shortcut icon" href="egg.png" />
<link rel="stylesheet" href="css/game.css" />
</head>
<!--onclick="walk()"-->
<body onkeydown="processKeyDown(event)">
<div id="canvas-box" onclick="walk()">
<canvas id="ctx" height="20" width="45"></canvas>
<canvas id="foreground" height="20" width="45"></canvas>
</div>
<div id="controls-box">
<p>
Tap the screen to walk
</p>
<div id="top-controls-box" class="controls">
<div id="up-button" class="control-button" onclick="processKeyDown({keyCode: ARROW_KEYS.UP})">
<p>UP</p>
</div>
</div>
<div id="mid-controls-box" class="controls">
<div id="left-button" class="control-button middle-buttons" onclick="processKeyDown({keyCode: ARROW_KEYS.LEFT})">
<p>LEFT</p>
</div>
<div id="right-button" class="control-button middle-buttons" onclick="processKeyDown({keyCode: ARROW_KEYS.RIGHT})">
<p>RIGHT</p>
</div>
</div>
<div id="bottom-controls-box" class="controls">
<div id="down-button" class="control-button" onclick="processKeyDown({keyCode: ARROW_KEYS.DOWN})">
<p>DOWN</p>
</div>
</div>
</div>
<div id="debug-box">
<label><input id="fps" type="text" /> fps</label>
<label><input id="steps" type="text" /> steps</label>
<textarea id="debugger"> </textarea>
<p>
D is debug, Esc is game loop, s is the render loop. Press any of them to disable or enable any of the loops.
</p>
</div>
</body>
<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-70003644-4', 'auto');
ga('send', 'pageview');
</script>
<script src="js/debugger.js" ></script>
<script src="js/BigInteger.min.js" ></script>
<script src="js/constants.js" ></script>
<script src="js/models/animals.js" ></script>
<script src="js/models/map.js" ></script>
<script src="js/models/cooldowns.js" ></script>
<script src="js/model.js" ></script>
<script src="js/rendering/sharedFunctions.js" ></script>
<script src="js/rendering/animals.js" ></script>
<script src="js/rendering/miscSprites.js" ></script>
<script src="js/rendering/maps.js" ></script>
<script src="js/rendering/screens.js" ></script>
<script src="js/renderLoop.js" ></script>
<script src="js/loop.js" ></script>
<script src="js/inputKeys.js" ></script>
<!--<script src="js/models/cooldownTests.js" ></script>-->
</html>