-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
54 lines (53 loc) · 1.49 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
<html>
<head>
<meta charset="UTF-8">
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.4/lodash.js"></script>
<script src="lib/perlin.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/numjs/0.14.2/numjs.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/87/three.min.js"></script>
<script type="text/javascript">
window.onerror = function(msg, url, line, col, error) {
document.getElementById('error-message').innerText = `${msg } : ${line}`
}
</script>
<style>
body {
padding: 0;
margin: 0;
background: #111;
text-align: center;
-webkit-user-select: none;
}
.helper {
display: inline-block;
height: 100%;
vertical-align: middle;
}
#canvas-container {
height: 100%;
}
#error-message {
position: fixed;
bottom: 0;
left: 0;
right: 0;
text-align: center;
padding: 30px;
color: white;
}
canvas {
cursor: crosshair;
transform: translateY(-50%);
position: relative;
top: 50%;
}
</style>
</head>
<body>
<div id="canvas-container" class="frame"></div>
<div id="error-message"></div>
<script src="Terrain.js"></script>
<script src="PointerLockControls.js"></script>
<script src="main.js"></script>
</body>
</html>