-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
74 lines (73 loc) · 2 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>
<head>
<title>Ballgame</title>
<style>
* {
padding: 0;
margin: 0;
}
canvas {
background: #eee;
display: block;
}
.hint {
position: absolute;
left: 130px;
top: 10px;
z-index: 1;
font-size: 1em;
font-family: "Lucida Console", "Courier New", monospace;
color: red;
}
.menu {
position: absolute;
left: 0px;
top: 0px;
z-index: 1;
font-size: 1em;
font-family: "Lucida Console", "Courier New", monospace;
padding: 5px;
/* color: red; */
}
.obstacle {
width: 110px;
background-color: silver;
margin: 3px;
padding: 2px;
user-select: none;
}
.obstacle:hover {
color: white;
}
.obstacle:active {
background-color: black;
}
.active {
background-color: black !important;
color: white;
}
input {
margin: 5px;
}
</style>
</head>
<body>
<canvas id="myCanvas"></canvas>
<div id="hint" class="hint">
<div>Space = add ball</div>
<div>B-Key = bubble collision</div>
<div>R-Key = rigid collision</div>
<div>move mouse to apply force...</div>
</div>
<div id="mode" class="hint"></div>
<div id="menu" class="menu">
<div id="rect" class="obstacle" onclick="ChangeObstacle(this.id)">Rectangle</div>
<div id="square" class="obstacle" onclick="ChangeObstacle(this.id)">Rounded</div>
<div id="force" class="obstacle" onclick="ChangeObstacle(this.id)">Force Field</div>
<div><input type="checkbox" name="shading" id="shading" onclick="updateShading(this.checked)"><label for="shading">shading</label></div>
<div><input type="checkbox" name="debug" id="debug" onclick="updateDebug(this.checked)"><label for="debug">debug</label></div>
</div>
<script type="module" src="./src/game.js"></script>
</body>
</html>