-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathindex.html
98 lines (95 loc) · 2.18 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
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<title>Race</title>
<style>
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
#container {
width: 1208px;
display: block;
margin-left: auto;
margin-right: auto;
}
#canvasContainer {
width: 1008px;
float: left;
}
#statsContainer {
width: 200px;
float: right;
}
.row {
width: inherit;
display: inline-block;
}
.border {
border: 4px solid #888;
}
.box {
display: block;
width: 100%;
margin: 0px 5px;
margin-bottom: 5px;
padding: 5px;
}
.lapList {
height: 100px;
overflow-y: auto;
}
.canvas {
float: right;
}
.center {
text-align: center;
}
.hidden {
display: none;
}
a:visited {
color: #000;
}
a:hover {
color: #999;
}
span.b {
font-weight: bold;
}
</style>
<script>function keyHandler () { }</script>
</head>
<body onkeydown="keyHandler(event)" onkeyup="keyHandler(event)">
<div id="container">
<div id="canvasContainer">
<canvas id="raceTrack" width="1000" height="600" class="border canvas"></canvas>
</div>
<div id="statsContainer">
<div class="border box">
Speed: <span id="speed" class="b">0.00</span> px/f <br>
Time: <span id="time" class="b">0.00</span> s <br>
Lap time <span id="lapTime" class="b">0.00</span> s <br>
Nr. of laps: <span id="nrLaps" class="b">0</span> <br>
<hr>
Lap times: <ol id="lapTimes" class="lapList"></ol>
</div>
<div class="border box">
Car: <select name="selectCar" onchange=""><option value="car1">Capsule</option></select><br>
Track: <select name="selectTrack" onchange="selectTrack();"></select>
</div>
<div class="border box">
FPS: <span id="fps"></span>
</div>
</div>
<div class="row center">
<p class="controls">Play with ← ↑ ↓ → and [space] (handbrake).</p>
</div>
<div class="row center">
<small><a href="http://urosh.net/">urosh.net</a></small>
</div>
</div>
<div class="hidden"><img id="track"><img id="hiddenTrack"><canvas id="hiddenCanvas" width="750" height="500"></canvas></div>
<script src='race.js'></script>
</body>
</html>