-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
120 lines (113 loc) · 5.82 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
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="icon" type="image/png" href="./assets/favicon.ico" />
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<title>maze</title>
</head>
<body">
<!-- modal -->
<div class="modal fade" id="colorModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Choose Color</h5>
<button type="button" class="close" data-dismiss="modal">
<span>×</span>
</button>
</div>
<div class="modal-body">
<input type="color" id="sc"><label for="sc">Click to choose color</label>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-info" data-dismiss="modal">Cancel</button>
<button type="button" class="btn btn-info" onclick="addColor();if(meta.created)renderMaze(meta.maze)" data-dismiss="modal">AddColor</button>
</div>
</div>
</div>
</div>
<!-- body -->
<div class="container mt-4">
<div class="row">
<div class="col-sm-4">
<ul class="list-group">
<li class="list-group-item title"><input type="checkbox" id="color" checked
onchange="showHideColorBlocks()">Colored</li>
<li class="colorSelection list-group-item colorBlock">
Rate of change <input id="colorRate" class="ml-4" onchange="update()"
type="range" title="rate of change of color (responsive)">
</li>
<li id="colorBoard" class="colorSelection list-group-item colorBlock">
<div id="addColor"><button class="btn btn-info mb-1" data-toggle="modal" data-target="#colorModal">Add more colors</button>
<button class="btn btn-info mb-1" onclick="addColor(Math.random(), Math.random(), Math.random());if(meta.created){renderMaze(meta.maze)};">Random</button><br></div>
<input class="mb-1" name="colorInput" title="change color (responsive)" type="color"
value="#ddeead" onchange="if(meta.created){renderMaze(meta.maze);}">
Choose color
</li>
<li class="list-group-item title">
<div>
<input onchange="switchShape()" type="radio" id="square" name="shape" checked>
<label for="square">square</label>
</div>
<div>
<input onchange="switchShape()" type="radio" id="heart" name="shape">
<label for="heart">heart</label>
</div>
<div>
<input onchange="switchShape()" type="radio" id="arbitrary" name="shape">
<label for="arbitrary">arbitrary</label>
</div>
</li>
<li style="display: none;" id="sizeRange" class="list-group-item heartBlock">
Change size<input type="range" onchange="if(meta.created)createMaze()"
id="heartSizeRange" title="Size of the heart (responsive)">
</li>
<li style="display: none;" class="list-group-item arbitraryBlock">
<input id="imageInput" type="file" accept="image/png, image/jpeg" onchange="uploadImage()">
<div id="imageView" style="padding-top: 10px;">
<p>Upload Image</p>
</div>
</li>
<li class="list-group-item">
<input id="rows" value="60" type="number"> rows/columns
</li>
<li class="list-group-item">
<button class="btn btn-info" onclick="createMaze()">create</button>
<button class="btn btn-warning" onclick="initiate()">clear</button>
</li>
</ul>
</div>
<div class="col-sm-8">
<canvas id="canvas" height="700" width="700"></canvas>
</div>
</div>
</div>
<div id="pics" style="display: none;">
<img src="./assets/pac-man.1.png">
<img src="./assets/pac-man.2.png">
<img src="./assets/pac-man.3.png">
<img src="./assets/pac-man.4.png">
</div>
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1"
crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"
integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM"
crossorigin="anonymous"></script>
<!-- <script src="render.js?version=1"></script> -->
<script src="Maze.js?version=4"></script>
<style>
.title{
background-color: #eeeeee;
}
.list-group-item{
border-radius: 0 !important;
}
</style>
</body>
</html>