-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.html
67 lines (54 loc) · 2.07 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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>You are in a maze of twisty little passages, all alike...</title>
<style>
@media print {
.noprint {display:none;}
}
.settings {
display:grid;
grid-template-columns: max-content max-content max-content;
grid-gap:5px;
}
.settings label { text-align:right; }
.settings label:after { content: ":"; }
</style>
</head>
<body>
<form class="noprint">
<fieldset class="settings">
<legend>Generate a Maze</legend>
<label for="mazeHeight">Maze Height (cells)</label>
<input type="range" id="mazeHeight" name="mazeHeight" min="2" max="200" value="15" oninput="this.nextElementSibling.value = this.value">
<output>15</output>
<label for="mazeWidth">Maze Width (cells)</label>
<input type="range" id="mazeWidth" name="mazeWidth" min="2" max="200" value="15" oninput="this.nextElementSibling.value = this.value">
<output>15</output>
<label for="oppositeStart">Distant Start/Finish</label>
<input type="checkbox" id="oppositeStart" name="oppositeStart">
<output></output>
<label for="showSolution">Show Solution</label>
<input type="checkbox" id="showSolution" name="showSolution">
<output></output>
<label for="labelMaze">Label Maze</label>
<input type="checkbox" id="labelMaze" name="labelMaze">
<output></output>
<label for="randomSeed">Seed (0 for random)</label>
<input type="number" id="randomSeed" name="randomSeed" min="-9007199254740991" max="9007199254740990" value="0">
<output></output>
<div>
<button id="generateButton" disabled>Generate</button>
<button id="exportButton" onclick="exportMaze(); return false;" disabled>Export as Image</button>
</div>
</fieldset>
</form>
<div>
<canvas id="targetCanvas" style="image-rendering: pixelated; image-rendering: crisp-edges;" />
</div>
<script src="pako.min.js"></script>
<script src="wasm_exec.js"></script>
<script src="index.js"></script>
</body>
</html>