-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
102 lines (99 loc) · 4.59 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Stick Ranger Map Maker</title>
<link rel="icon" type="image/x-icon" href="favicon.ico">
<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/FileSaver.js/2.0.5/FileSaver.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/javascript-canvas-to-blob/3.29.0/js/canvas-to-blob.min.js"></script>
</head>
<body>
<div id="top">
<div id="submitFiles">
<label for="tileFile">Upload Tileset</label>
<input type="file" accept="image/*" id="tileFile" name="tilefile" placeholder="test">
<label for="bottomFile">Upload Bottom Layer</label>
<input type="file" accept="image/*" id="bottomFile" name="bottomfile">
<label for="topFile">Upload Top Layer</label>
<input type="file" accept="image/*" id="topFile" name="topfile">
</div>
<div id="canvasSize">
<h2>MAP SETTINGS</h2>
<div id="sizeInputs">
<div>
<label for="mapCanvasW">Width:</label>
<input type="number" id="mapCanvasW" name="mapCanvasW" value="62" autocomplete="off">
</div>
<div>
<label for="mapCanvasH">Height:</label>
<input type="number" id="mapCanvasH" name="mapCanvasH" value="20" autocomplete="off">
</div>
</div>
<div>
<label for="previewMode">Preview Mode</label>
<input type="checkbox" id="previewMode" name="previewMode" autocomplete="off" checked>
</div>
<div>
<label for="alternateGrid">Offset Grid</label>
<input type="checkbox" id="alternateGrid" name="alternateGrid" autocomplete="off">
</div>
</div>
<div id="drawSettings">
<h2>DRAW SETTINGS</h2>
<p>Mode</p>
<div id="modeButtons">
<input type="radio" id="drawRadio" name="buttonRadio" checked="checked">
<label for="drawRadio"><img src="./images/pencil.png" /></label>
<input type="radio" id="eraseRadio" name="buttonRadio">
<label for="eraseRadio"><img src="./images/eraser.png" /></label>
</div>
<p>Layer</p>
<div id="layerButtons">
<input type="radio" id="bottomRadio" name="settingRadio" checked="checked">
<label for="bottomRadio"><img src="./images/bottom.png" /></label>
<input type="radio" id="topRadio" name="settingRadio">
<label for="topRadio"><img src="./images/top.png" /></label>
<input type="radio" id="bothRadio" name="settingRadio" disabled>
<label for="bothRadio"><img src="./images/both.png" /></label>
</div>
</div>
<div id="exportButtons">
<button id="mapDownload">Export Bottom Layer</button>
<button id="topDownload">Export Top Layer</button>
<button id="fullDownload">Export Full Map</button>
</div>
</div>
<div id="mid">
<div id="midLeft">
<canvas id="tileCanvas" width="176px" height="320px"></canvas>
<canvas id="tileGridCanvas" width="176px" height="320px"></canvas>
</div>
<div style="width:16px"></div>
<div id="midRight">
<canvas id="colorCanvas" width="992px" height="320px"></canvas>
<canvas id="mapCanvas" width="992px" height="320px"></canvas>
<canvas id="topCanvas" width="992px" height="320px"></canvas>
<canvas id="gridCanvas" width="992px" height="320px"></canvas>
</div>
</div>
<div id="bot">
<span>Made by: joaomarcosh</span>
<a href="https://github.com/joaomarcosh/StickRangerMapMaker" target=”_blank”>
<img style="width:32px;height:32px" src="./images/github.png" /
></a>
</div>
<script src="helpers/autotiles.js"></script>
<script src="helpers/createTiles.js"></script>
<script src="helpers/changeCanvasSize.js"></script>
<script src="helpers/exportFullMap.js"></script>
<script src="helpers/loadFile.js"></script>
<script src="helpers/place.js"></script>
<script src="helpers/getMousePos.js"></script>
<script src="canvas/Canvas.js"></script>
<script src="canvas/GridCanvas.js"></script>
<script src="index.js"></script>
<script src="events.js"></script>
</body>
</html>