-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
94 lines (88 loc) · 6.22 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
<!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="vendors/bootstrap/bootstrap.min.css">
<script src="vendors/honeycomb.min.js"></script>
<script src="vendors/pixi.min.js"></script>
<script src="vendors/reimg.js"></script>
<script src="vendors/jquery-3.3.1.slim.min.js"></script>
<script src="vendors/popper.min.js"></script>
<script src="vendors/bootstrap/bootstrap.min.js"></script>
<script src="resources/js/source.js"></script>
<title>Configurable Hex Grid Generator</title>
<link href="data:image/x-icon;base64,AAABAAEAEBAAAAAAAABoBQAAFgAAACgAAAAQAAAAIAAAAAEACAAAAAAAAAEAAAAAAAAAAAAAAAEAAAAAAAAAAAAAX19fAJOTkwAJCQkA+/v7AD09PQC3t7cA/f39ANvb2wBRUVEA5OTkACYmJgA4ODgAy8vLAP///wAWFhYAqampAO/v7wCZmZkAbm5uAL29vQDGxsYA+vr6AAEBAQDz8/MA/Pz8ABMTEwAcHBwAhISEAFlZWQDs7OwA9fX1AAwMDAD+/v4AdHR0AH19fQAnJycAMDAwABcXFwBLS0sAICAgACkpKQCjo6MAGRkZANfX1wDg4OAAKysrAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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ACcsDg4pAAAAAAAAAAAAAAAAKw4OCwAAAAAAAAAAAAAAAA8ODgsAAAAAAAAAAAAAAAAPDg4LAAAAAAAAAAAAAAAADw4OCwAAAAAAAAAAAAAAAA8ODgsAAAAAAAAAAAAAAAAPDg4LAAAAAAAAAAAAAAAADw4OJAAAAAAAAAAAAAAAACYODg0FAAAAAAAAAAAAAAwVDg4OBxAoAAAAAAAAGyoZDg4ODg4OHxwgAAADIxgODg4ODg4ODg4OCgEdLQ4ODg4ODgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=" rel="icon" type="image/x-icon" />
</head>
<body>
<div class="ml-4">
<p class="mt-3">
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#gridSettingsModal">
Configure Grid
</button>
<button type="button" class="btn btn-primary" onclick="downloadCanvasAsPng()">
Download as PNG
</button>
</p>
</div>
<div class="ml-4" id="grid">
<canvas id="canvas" class="border border-dark"></canvas>
</div>
<!-- Modal -->
<div class="modal fade" id="gridSettingsModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Grid Settings</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<form id="gridSettingsForm" name="gridSettings" role="form">
<div class="modal-body">
<div class="form-row">
<div class="form-group col-md-6">
<label for="hexSize">Edge Size</label>
<input type="number" class="form-control" id="hexSize" name="hexSize" >
</div>
<div class="form-group col-md-6">
<label for="lineThickness">Line Thickness</label>
<input type="number" class="form-control" id="lineThickness" name="lineThickness">
</div>
</div>
<div class="form-group">
<label for="hexOrientation">Orientation</label>
<select class="form-control" id="hexOrientation" name="hexOrientation">
<option value="flat" selected>Flat</option>
<option value="pointy">Pointy</option>
</select>
</div>
<div class="form-row">
<div class="form-group col-md-6">
<label for="hexColumns">Columns</label>
<input type="number" class="form-control" id="hexColumns" name="hexColumns">
</div>
<div class="form-group col-md-6">
<label for="hexRows">Rows</label>
<input type="number" class="form-control" id="hexRows" name="hexRows">
</div>
</div>
<div class="form-row">
<div class="form-group col-md-6">
<input class="form-group" type="checkbox" id="hideCoords" name="hideCoords">
<label for="hideCoords">
Hide Coordinates
</label>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="submit" class="btn btn-primary">Apply</button>
</div>
</form>
</div>
</div>
</div>
</body>
</html>