-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
49 lines (49 loc) · 974 Bytes
/
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
<html>
<head>
<meta content="text/html;charset=utf-8" http-equiv="Content-Type"/>
<style>
body {
margin: 0;
}
#canvas {
width: 100vw;
height: 100vh;
margin: auto;
position: absolute;
top:0;bottom:0; /* vertical center */
left:0;right:0; /* horizontal center */
}
#canvas:active {
cursor: none;
}
#fps {
position: absolute;
top: 0;
left: 0;
background-color: rgba(255, 255, 255, 0.5);
padding: 5px;
border-bottom-right-radius: 5px;
}
#instructions {
margin: 0 auto;
width: 500px;
background-color: rgba(255, 255, 255, 0.5);
padding: 5px;
border-radius: 5px;
position: absolute;
top: 10px;
text-align: center;
left: 0;
right: 0;
}
</style>
</head>
<body>
<canvas id="canvas"></canvas>
<div id="instructions">
Press "W,A,S,D" to move the camera.<br>
Click and drag the mouse to rotate the camera.
</div>
<div id="fps"></div>
<script type="text/javascript" src="index.js"></script></body>
</html>