-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
90 lines (88 loc) · 2.01 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Testing Matter.js</title>
<script src="js/matter.js"></script>
<script src="js/jquery-3.1.0.slim.min.js"></script>
<script src="js/socket.io-1.4.5.js"></script>
<script src="js/graphics.min.js"></script>
<style>
body,html {
min-height: 100%;
width: 100%;
box-sizing: border-box;
margin:0;
padding:0;
}
#container {
height: 370px;
width: 800px;
box-sizing: border-box;
margin:0;
padding:0;
-webkit-user-drag: none;
-khtml-user-drag: none;
-moz-user-drag: none;
-o-user-drag: none;
user-drag: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-o-user-select: none;
user-select: none;
}
#fps {
font-family: monospace;
padding: 15px;
font-size: 16px;
}
#fps::before {
content: "FPS: ";
}
#states {
font-family: monospace;
padding: 15px;
font-size: 16px;
}
#states p {
margin: 0;
}
#states p.hole {
cursor: default;
pointer-events: none;
}
#states p.body, #states p.hole.active {
cursor: pointer;
}
#states p.body:hover {
color: #0094ff;
}
#states p.body:hover::after {
content: " PUT ->";
}
#states p.body.picked {
font-weight: bold;
}
#states.active p.hole {
pointer-events: all;
}
#states.active p.hole:hover {
color: #ff004c;
cursor: pointer;
}
#states.active p.hole:hover::after {
content: " <- PUT";
}
#states.active p.body {
pointer-events: none;
}
</style>
</head>
<body>
<div id="container" draggable="false"></div>
<div id="fps"></div>
<div id="states"></div>
</body>
<script src="js/demo.js"></script>
</html>