-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
62 lines (52 loc) · 1.89 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
<html>
<head>
<meta charset="UTF-8">
<title>Dungeon Generator | CS 81 Final | Ian Sikes</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div id="container">
<canvas id="cnv" width="700" height="700"></canvas>
<h2 class="title">Dungeon Generator</h2>
<p class="desc">
Create a map usable with role-playing games like
Dungeons and Dragons. Try adjusting the sliders for
different outputs.
</p>
<div id="options">
<div class="option">
<input id="grid-size" type="range" min="6" max="18" value="10">
<label for="grid-size">Grid Size</label>
</div>
<div class="option">
<input id="max-rooms" type="range" min="6" max="18" value="10">
<label for="max-rooms">Rooms</label>
</div>
<div class="option">
<input id="min-size" type="range" min="4" max="12" value="6">
<label for="min-size">Min Size</label>
</div>
<div class="option">
<input id="max-size" type="range" min="14" max="20" value="14">
<label for="max-size">Max Size</label>
</div>
</div>
<button id="regenerate">Regenerate map</button>
<a id="download" download="dungeon-map.png">Download as image</a>
</div>
<footer>Made by Ian Sikes</footer>
<!--Hidden images are used as textures for the map-->
<img id="floor" src="img/floor.png" style="display:none;">
<img id="corridor" src="img/corridor.png" style="display:none;">
<img id="wall" src="img/wall.png" style="display:none;">
<img id="exit" src="img/exit.png" style="display:none;">
<img id="entrance" src="img/entrance.png" style="display:none;">
<img id="bg" src="img/bg.png" style="display:none;">
<!--Scripts-->
<script src="lib/delaunay/delaunay.js"></script>
<script src="util.js"></script>
<script src="edge.js"></script>
<script src="room.js"></script>
<script src="index.js"></script>
</body>
</html>