-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
72 lines (56 loc) · 2.68 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="style.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.8.0/p5.min.js"></script>
<script src="./lib/maze-node.js"></script>
<script src="./lib/pathfinder.js"></script>
<script src="./lib/maze-generator.js"></script>
<script src="./lib/finder-diffuse.js"></script>
<script src="./lib/finder-astar.js"></script>
<script src="./lib/finder-mazerouter.js"></script>
<script src="./lib/utils.js"></script>
<script src="./lib/draw.js"></script>
<script src="./index.js"></script>
<title>Maze Pathfinding</title>
</head>
<body>
<h1 class="box">Maze Generator </h1>
<div class="box flex" style="background: white;">
<div class="container">
<div class="smallbox">
<div class="txt">Maze Size</div>
<input type="range" min="10" max="85" value="25" class="slider" id="sizeSlider"
onchange="createNewMaze()">
<div class="txt">Maze Complexity</div>
<input type="range" min="50" max="100" value="90" class="slider" id="complexitySlider"
onchange="createNewMaze()">
<br>
<button id="generateButton" class="btn" color="white" onClick="createNewMaze()">GENERATE</button>
</div>
<div class="smallbox">
<select id="finderselect" class="select-css">
<option value="-1"> ..select a maze solver </option>
<option value="0">Simple Diffuse</option>
<option value="1">A* Pathfinder</option>
<option value="2">Maze Router</option>
</select>
<div class="txt" style="margin-top: 15px;">Solving speed</div>
<input type="range" min="0" max="100" value="5" class="slider" id="speedSlider">
<button id="solveButton" class="btn" color="white" onClick="startSolver()">SOLVE</button>
<button id="resetButton" class="btn" color="white" onClick="resetSolver()">RESET</button>
</div>
</div>
<div id="canvasContainer">
<span id="canvas1"></span>
<div id="info">
<span class="txt" style="font-size: 15px;" id="length">-- <br> -- </span>
</div>
</div>
</div>
<p style="text-align: center; max-width: 1200;">Generate a maze and choose a solver. Click on the top or the bottom
of the maze to change the entry points</p>
</body>
</html>