-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
81 lines (72 loc) · 1.9 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<meta name="theme-color" content="#222222">
<title>Procedural Voxel World Generator</title>
<style>
html,
body {
margin: 0;
height: 100%;
background-color: #222222;
}
#minecraft {
width: 100%;
height: 100%;
}
.lil-gui {
--width: 500px;
--name-width: 10%;
--font-size: 15px;
--input-font-size: 15px;
--widget-height: 20px;
}
#loading {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
}
#loading .progress {
margin: 1.5em;
border: 1px solid white;
width: 50vw;
}
#loading .progressbar {
margin: 2px;
background: white;
height: 1em;
transform-origin: top left;
transform: scaleX(0);
}
</style>
<script type="importmap">
{
"imports": {
"three": "https://unpkg.com/[email protected]/build/three.module.js",
"three/addons/": "https://unpkg.com/[email protected]/examples/jsm/"
}
}
</script>
<script type="module" src="js/webgl.js"></script>
<script type="module">
import main from "./js/minecraft.js";
main();
</script>
</head>
<body>
<div id="container"></div>
<div id="loading">
<div class="progress three-demo">
<div class="progressbar three-demo"></div>
</div>
</div>
<canvas id="minecraft"></canvas>
</body>
</html>