-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
46 lines (37 loc) · 1.85 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
<html>
<head>
<meta charset="UTF-8">
<script language="javascript" type="text/javascript" src="libraries/p5.js"></script>
<script language="javascript" src="libraries/p5.dom.js"></script>
<script language="javascript" src="libraries/p5.sound.js"></script>
<script language="javascript" src="libraries/Box2d.js"></script>
<script language="javascript" type="text/javascript" src="sketch.js"></script>
<script language="javascript" type="text/javascript" src="ConnectionGene.js"></script>
<script language="javascript" type="text/javascript" src="ConnectionHistory.js"></script>
<script language="javascript" type="text/javascript" src="Node.js"></script>
<script language="javascript" type="text/javascript" src="Player.js"></script>
<script language="javascript" type="text/javascript" src="Population.js"></script>
<script language="javascript" type="text/javascript" src="Species.js"></script>
<script language="javascript" type="text/javascript" src="Genome.js"></script>
<script language="javascript" type="text/javascript" src="Wheel.js"></script>
<script language="javascript" type="text/javascript" src="Car.js"></script>
<script language="javascript" type="text/javascript" src="Ground.js"></script>
<script language="javascript" type="text/javascript" src="Person.js"></script>
</head>
<body>
<div id = "main">
<h2> Hill Climb Racing </h2>
<div id = "canvas">
</div>
</div>
<script>
//center the canvas
var tempString = ""+((window.innerWidth*0.9- 1026 - window.innerWidth*0.9*0.08 )/2)+ "px";
document.getElementById("main").style.marginLeft = tempString;
window.onresize = function(event) {
var tempString = ""+((window.innerWidth*0.9- 1026 - window.innerWidth*0.9*0.08 )/2)+ "px";
document.getElementById("main").style.marginLeft = tempString;
};
</script>
</body>
</html>