-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
244 lines (226 loc) · 11.4 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="style.css">
<title>Terrain Generation</title>
<!-- Bootstrap core CSS -->
<link href="https://getbootstrap.com/docs/4.1/dist/css/bootstrap.min.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="https://getbootstrap.com/docs/4.1/examples/dashboard/dashboard.css" rel="stylesheet">
</head>
<body>
<nav class="navbar navbar-dark fixed-top bg-dark flex-md-nowrap p-0 shadow">
<a class="navbar-brand col-sm-3 col-md-2 mr-0" href="#">Terrain Generation</a>
</nav>
<div class="container-fluid">
<div class="row">
<nav class="col-md-2 d-none d-md-block bg-light sidebar">
<div class="sidebar-sticky">
<ul class="nav flex-column">
<li class="nav-item">
<a class="nav-link active" href="#">
<span data-feather="home"></span>
Generation <span class="sr-only">(current)</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">
<span data-feather="file"></span>
Scale: <p id="scaleValue"></p>
</a>
<input type="range" min="1" max="20" value="4" class="slider" id="scale">
<hr>
</li>
<li class="nav-item">
<a class="nav-link" href="#">
<span data-feather="file"></span>
Noise Multiplier <p id="noiseMultiValue"></p>
</a>
<input type="range" min="1" max="100" value="40" class="slider" id="noiseMulti">
<hr>
</li>
</ul>
<h6 class="sidebar-heading d-flex justify-content-between align-items-center px-3 mt-4 mb-1 text-muted">
<span>Layers (Greater - Higher Elevation</span>
<a class="d-flex align-items-center text-muted" href="#">
<span data-feather="plus-circle"></span>
</a>
</h6>
<ul class="nav flex-column mb-2">
<li class="nav-item">
<a class="nav-link" href="#">
<span data-feather="file-text"></span>
Layer 1 (Huge Landmasses)<p id="layer1Value"></p>
</a>
<input type="range" min="0" max="20" value="12" class="slider" id="layer1">
<hr>
</li>
<li class="nav-item">
<a class="nav-link" href="#">
<span data-feather="file-text"></span>
Layer 2 (Large Landmasses)<p id="layer2Value"></p>
</a>
<input type="range" min="0" max="20" value="10" class="slider" id="layer2">
<hr>
</li>
<li class="nav-item">
<a class="nav-link" href="#">
<span data-feather="file-text"></span>
Layer 3 <p id="layer3Value"></p>
</a>
<input type="range" min="0" max="200" value="40" class="slider" id="layer3">
<hr>
</li>
<li class="nav-item">
<a class="nav-link" href="#">
<span data-feather="file-text"></span>
Layer 4 <p id="layer4Value"></p>
</a>
<input type="range" min="0" max="200" value="20" class="slider" id="layer4">
<hr>
</li>
<li class="nav-item">
<a class="nav-link" href="#">
<span data-feather="file-text"></span>
Layer 5 <p id="layer5Value"></p>
</a>
<input type="range" min="0" max="20" value="10" class="slider" id="layer5">
<hr>
</li>
<li class="nav-item">
<a class="nav-link" href="#">
<span data-feather="file-text"></span>
Layer 6 (Islands)<p id="layer6Value"></p>
</a>
<input type="range" min="0" max="20" value="5" class="slider" id="layer6">
<hr>
</li>
<li class="nav-item">
<a class="nav-link" href="#">
<span data-feather="file-text"></span>
Layer 7 (Detail)<p id="layer7Value"></p>
</a>
<input type="range" min="0" max="20" value="3" class="slider" id="layer7">
<hr>
</li>
<li class="nav-item">
<a class="nav-link" href="#">
<span data-feather="file-text"></span>
Layer 8 (Low-level Detail)<p id="layer8Value"></p>
</a>
<input type="range" min="0" max="2000" value="120" class="slider" id="layer8">
<hr>
</li>
<li class="nav-item">
<a class="nav-link" href="#">
<span data-feather="file-text"></span>
Layer 9 <p id="layer9Value"></p>
</a>
<input type="range" min="0" max="2000" value="80" class="slider" id="layer9">
<hr>
</li>
<li class="nav-item">
<a class="nav-link" href="#">
<span data-feather="file-text"></span>
Layer 10 (Small-scale Noise)<p id="layer10Value"></p>
</a>
<input type="range" min="0" max="2000" value="60" class="slider" id="layer10">
<hr>
</li>
</ul>
<h6 class="sidebar-heading d-flex justify-content-between align-items-center px-3 mt-4 mb-1 text-muted">
<span>Biomes</span>
<a class="d-flex align-items-center text-muted" href="#">
<span data-feather="plus-circle"></span>
</a>
</h6>
<ul class="nav flex-column mb-2">
<li class="nav-item">
<a class="nav-link" href="#">
<span data-feather="file-text"></span>
Water Level <p id="waterLevelValue"></p>
</a>
<input type="range" min="-1000" max="2000" value="0" class="slider" id="waterLevel">
<hr>
</li>
<li class="nav-item">
<a class="nav-link" href="#">
<span data-feather="file-text"></span>
Ice Spread <p id="iceMultiValue"></p>
</a>
<input type="range" min="1" max="20" value="4" class="slider" id="iceMulti">
<hr>
</li>
</ul>
<h6 class="sidebar-heading d-flex justify-content-between align-items-center px-3 mt-4 mb-1 text-muted">
<span>Temperature</span>
<a class="d-flex align-items-center text-muted" href="#">
<span data-feather="plus-circle"></span>
</a>
</h6>
<ul class="nav flex-column mb-2">
<li class="nav-item">
<a class="nav-link" href="#">
<span data-feather="file-text"></span>
Base Temperature <p id="baseTempValue"></p>
</a>
<input type="range" min="0" max="100" value="50" class="slider" id="baseTemp">
<hr>
</li>
<li class="nav-item">
<a class="nav-link" href="#">
<span data-feather="file-text"></span>
Temperature Loss (Latitude) <p id="tempMultiplierValue"></p>
</a>
<input type="range" min="1" max="100" value="15" class="slider" id="tempMultiplier">
<hr>
</li>
<li class="nav-item">
<a class="nav-link" href="#">
<span data-feather="file-text"></span>
Temperature Loss (Elevation) <p id="tempElevationValue"></p>
</a>
<input type="range" min="1" max="100" value="20" class="slider" id="tempElevation">
<hr>
</li>
</ul>
</div>
</nav>
<main role="main" class="col-md-9 ml-sm-auto col-lg-10 px-4">
<div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom">
<h1 class="h2">Terrain Generation</h1>
<div class="btn-toolbar mb-2 mb-md-0">
<div class="btn-group mr-2">
<button class="btn btn-sm btn-outline-primary" onclick="game.regenerateWorld();">Regenerate World</button>
</div>
</div>
</div>
<!-- World Sandbox -->
<canvas id="dashboard" width="1200" height="600" tabindex="1"></canvas>
<p> You can find the source code <a href="https://gitlab.com/sam.mills/TerrainSimulator/">here!</a></p>
<canvas id="chunk" width="100" height="100" tabindex="1"></canvas>
</main>
</div>
</div>
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script>window.jQuery || document.write('<script src="https://getbootstrap.com/docs/4.1/assets/js/vendor/jquery-slim.min.js"><\/script>')</script>
<script src="https://getbootstrap.com/docs/4.1/assets/js/vendor/popper.min.js"></script>
<script src="https://getbootstrap.com/docs/4.1/dist/js/bootstrap.min.js"></script>
<!-- Icons -->
<script src="https://unpkg.com/feather-icons/dist/feather.min.js"></script>
<!-- Dependencies -->
<script src="./lib/simplex-noise.js"></script>
<!-- World Files -->
<script src="./world/tiles.js"></script>
<script src="./world/world.js"></script>
<!-- Game Files -->
<script src="./game/game.js"></script>
<!-- Controller -->
<script src="./app.js"></script>
</body>
</html>