-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
70 lines (67 loc) · 2.26 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
<!DOCTYPE html>
<html>
<head>
<title>CSSCRAFT</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=VT323&display=swap" rel="stylesheet">
<link href='styles/cssCraft.css' rel='stylesheet' type='text/css' />
<script src="javascript/prefixfree.min.js"></script>
</head>
<body>
<div id="ui" class="hidden" >
<button id="btn-pointer-lock">Click for mouse control</button>
<div id="menu">
<button id="btn-fullscreen"><img src="images/full-screen.png" alt="Menu" /></button>
<div id="menu-container">
<button id="btn-menu"><img src="images/menu.png" alt="Menu" /></button>
<div id="submenu">
<label for="render-distance">Render Distance:</label>
<fieldset id="render-distance">
<input type="range" min="2" max="5" />
<label>3</label>
</fieldset>
</div>
</div>
</div>
</div>
<div id="start-screen">
<div class="container">
<img id="logo" src="images/csscraft.png" alt="CSSCRAFT" />
<div class="container">
<button id="start">Start</button>
<div id="github">
<a class="combo-button" href="https://github.com/tecouchman/CSSCraft" target="_blank" >
<span class="button"><img src="./images/GitHub.png" alt="GitHub Logo" /></span>
<span class="button">View on GitHub</span>
</a>
</div>
</div>
</div>
</div>
<div id="viewport" class="blur">
<div id="overlay">
</div>
<div id="game">
<div id="rotation">
<div id="scene">
</div>
</div>
</div>
</div>
<script type="module" src="javascript/CSSCraft.js"></script>
<script src="javascript/perlin.js"></script>
<script type="module">
import { start, requestPointerLock, setDemoMode } from './javascript/CSSCraft.js'
start(true);
document.getElementById('start').onclick = function() {
requestPointerLock();
setDemoMode(false);
document.getElementById('start-screen').classList.add('fade-out');
document.getElementById('viewport').classList.remove('blur');
document.getElementById('ui').classList.remove('hidden');
};
</script>
</body>
</html>