-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
90 lines (83 loc) · 3.83 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Tile Collision Array Builder</title>
<link rel="stylesheet" href="./bootstrap/bootstrap.css">
<link rel="stylesheet" href="./index.css">
</head>
<div class="container" style="height: 100vh;">
<div class="row text-center pb-5" style>
<h1>Tile Collision Array Builder</h1>
</div>
<div class="row h-100 align-items-start justify-content-start gx-1">
<div class="row">
<div class="col">
<div class="row">
<h4>Select Tile:</h4>
</div>
<div class="row pb-2">
<input type="file" id="fileSelect" accept="image/png, image/jpeg">
</div>
<div class="row onlyWhenFile">
<div>
<canvas id="tileSelectCanvas"></canvas>
</div>
</div>
<div class="row onlyWhenFile">
<div>
<input type="number" id="tileIndex" min="0" style="width: 60px;"/>
<label for="tileIndex">Tile Index</label>
</div>
</div>
<div class="row mt-4 onlyWhenFile">
<h4>Grid Settings:</h4>
<div>
<input type="number" id="cellCount" min="0" step="2" style="width: 60px;" value="32"/>
<label for="cellCount">Cells²</label>
</div>
<h4>Angle Settings:</h4>
<div>
<div>
<input type="checkbox" id="singleAngleValue">
<label for="arrayAngle">Use single angle value</label>
</div>
<div id="angleInput" style="display: none;">
<input type="number" id="angle" min="0" max="90" style="width: 60px;" value="0"/>
<label for="angle">Angle</label>
</div>
</div>
<div id="arrayAngleSettings">
<div>
<input type="number" id="initialAngle" min="0" max="90" style="width: 60px;" value="0"/>
<label for="initialAngle">Initial Angle</label>
</div>
<div>
<input type="number" id="lastAngle" min="0" max="90" style="width: 60px;" value="90"/>
<label for="lastAngle">Last Angle</label>
</div>
<div>
<input type="number" id="smoothFactor" min="0" max="1" step="0.1" style="width: 60px;" value="0.5"/>
<label for="smoothFactor">Smooth Factor</label>
</div>
</div>
</div>
</div>
<div class="col mt-xl-4 mt-xxl-0 onlyWhenFile">
<h4>Draw collision shape:</h4>
<div>
<canvas id="gridCanvas"></canvas>
</div>
</div>
</div>
<div class="row onlyWhenFile">
<h4>Output:</h4>
<textarea id="output" rows="10"></textarea>
</div>
</div>
</div>
<!-- <script src="./bootstrap/bootstrap.bundle.js"></script> -->
<script type="module" src="./dist/index.js"></script>
</body>
</html>