forked from jobtalle/SDFMaker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
82 lines (82 loc) · 3.71 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="description" content="An online tool to convert high resolution images with transparency to low resolution images with signed distance fields.">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>SDF maker</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div id="wrapper">
<h1>SDF maker</h1>
<p>Released <a target="_blank" href="https://github.com/jobtalle/SDFMaker">on GitHub</a> under the <a target="_blank" href="https://github.com/jobtalle/SDFMaker/blob/master/LICENSE">MIT license</a>. Made by <a target="_blank" href="https://jobtalle.com/">Job Talle</a>.</p>
<p>The readme file on <a target="_blank" href="https://github.com/jobtalle/SDFMaker">on GitHub</a> contains a tutorial and more information about the parameters.</p>
<div id="columns">
<div class="column">
<div id="input" class="panel">
<div id="input-left">
<div id="input-message">
<h2>Drop a .png or .svg image here</h2>
</div>
<canvas id="input-target" width="500" height="500"></canvas>
<canvas id="preview-canvas" width="500" height="500"></canvas>
</div>
<div id="input-right">
<div>
<input id="button-upload" type="file">
<div id="input-info"></div>
</div>
<div id="settings">
<table>
<tr>
<td>
<label for="setting-width">Width:</label>
</td>
<td>
<input type="number" id="setting-width" min="1" max="32768">
</td>
</tr>
<tr>
<td>
<label for="setting-height">Height:</label>
</td>
<td>
<input type="number" id="setting-height" min="1" max="32768">
</td>
</tr>
<tr>
<td>
<label for="setting-radius">Radius:</label>
</td>
<td>
<input type="number" id="setting-radius" min="1" max="256">
</td>
</tr>
<tr>
<td>
<label for="setting-threshold">Threshold:</label>
</td>
<td>
<input type="number" id="setting-threshold" min="0" max="1" step=".01" value="0.5">
</td>
</tr>
</table>
<button id="button-generate">Generate</button>
</div>
</div>
</div>
</div>
<div class="column">
<div id="output" class="panel">
<div id="output-container"></div>
<button id="button-save">Save</button>
</div>
</div>
</div>
</div>
<script src="js/lib/pako.min.js"></script>
<script src="js/lib/UPNG.js"></script>
<script src="js/main.js" type="module"></script>
</body>
</html>