forked from skarab42/lw.rasterizer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
210 lines (210 loc) · 13.6 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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>lw.Rasterizer.js</title>
<link rel="stylesheet" href="css/main.css?v=1.0.0" />
<script async defer src="https://buttons.github.io/buttons.js"></script>
</head>
<body>
<div id="rasterizer">
<ul id="sidebar">
<li><h1>lw.Rasterizer.js</h1></li>
<li>
<label class="control button">Browse <input id="fileInput" type="file" /></label>
<span class="tooltip" name="browse"></span>
</li>
<li>
<a class="control button" id="rasterizeButton">Rasterize</a>
<span class="tooltip" name="rasterize"></span>
</li>
<li>
<label class="control">
<span>PPI</span> :
<input id="ppiInput" type="number" min="25.4" step="0.1" placeholder="254" />
</label>
<span class="tooltip" name="ppi"></span>
</li>
<li>
<label class="control">
<span>Beam size</span> :
<input id="beamSizeInput" type="number" min="0.01" step="0.01" placeholder="0.1" />
<span class="unit">mm</span>
</label>
<span class="tooltip" name="beamSize"></span>
</li>
<li>
<label class="control">
<span>Beam range</span> :
<input id="beamRangeMinInput" type="number" min="0" placeholder="0" value="0" disabled /> to
<input id="beamRangeMaxInput" type="number" min="0" placeholder="1" />
</label>
<span class="tooltip" name="beamRange"></span>
</li>
<li>
<label class="control">
<span>Beam power</span> :
<input id="beamPowerMinInput" type="number" min="0" max="100" step="1" placeholder="0" /> to
<input id="beamPowerMaxInput" type="number" min="0" max="100" step="1" placeholder="100" />
<span class="unit">%</span>
</label>
<span class="tooltip" name="beamPower"></span>
</li>
<li>
<label class="control">
<span>Feed rate</span> :
<input id="feedRateInput" type="number" min="1" step="1" placeholder="1500" />
<span class="unit">
<select id="feedUnitInput">
<option>mm/min</option>
<option>mm/sec</option>
</select>
</span>
</label>
<span class="tooltip" name="feedRate"></span>
</li>
<li>
<label class="control">
<span>Offsets (X / Y)</span> :
<input id="offsetsXInput" type="number" placeholder="0" value="0" /> /
<input id="offsetsYInput" type="number" placeholder="0" value="0" />
<span class="unit">mm</span>
</label>
<span class="tooltip" name="offsets"></span>
</li>
<li>
<label class="control">
<span>Overscan</span> :
<input id="overscanInput" type="number" placeholder="0" min="0" placeholder="0" value="0" />
<span class="unit">mm</span>
</label>
<span class="tooltip" name="overscan"></span>
</li>
<li>
<label class="control">
<span>Grayscaling</span> :
<select id="grayscaleSelect" class="fr">
<option>average</option>
<option>luma</option>
<option>luma-601</option>
<option>luma-709</option>
<option>luma-240</option>
<option>desaturation</option>
<option>decomposition-min</option>
<option>decomposition-max</option>
<option>red-chanel</option>
<option>green-chanel</option>
<option>blue-chanel</option>
</select>
</label>
<span class="tooltip" name="grayscale"></span>
</li>
<li>
<label class="control">
<span>Shades of gray</span> :
<input id="shadesOfGrayInput" type="number" placeholder="256" value="256" min="2" max="256" step="1" /> / 256
</label>
<span class="tooltip" name="shadesOfGray"></span>
</li>
<li>
<label class="control">
<input id="smoothingCheckbox" type="checkbox" /> Image smoothing
</label>
<span class="tooltip" name="smoothing"></span>
</li>
<li>
<label class="control">
<span>Image contrast</span> :
<input id="contrastInput" type="range" placeholder="0" value="0" min="-255" max="255" step="1" />
<span id="contrastValue" class="unit">0</span>
</label>
<span class="tooltip" name="contrast"></span>
</li>
<li>
<label class="control">
<span>Image brightness</span> :
<input id="brightnessInput" type="range" placeholder="0" value="0" min="-255" max="255" step="1" />
<span id="brightnessValue" class="unit">0</span>
</label>
<span class="tooltip" name="brightness"></span>
</li>
<li>
<label class="control">
<span>Image gamma</span> :
<input id="gammaInput" type="range" placeholder="0" value="0" min="0" max="3" step="0.01" />
<span id="gammaValue" class="unit">0</span>
</label>
<span class="tooltip" name="gamma"></span>
</li>
<li>
<label class="control">
<input id="trimLineCheckbox" type="checkbox" /> Trim trailing white pixels
</label>
<span class="tooltip" name="trimLine"></span>
</li>
<li>
<label class="control">
<input id="joinPixelCheckbox" type="checkbox" /> Join consecutive pixels with same intensity
</label>
<span class="tooltip" name="joinPixel"></span>
</li>
<li>
<label class="control">
<input id="burnWhiteCheckbox" type="checkbox" /> Burn white pixels at no power (G1 S0).
</label>
<span class="tooltip" name="burnWhite"></span>
</li>
<li>
<label class="control">
<input id="verboseGCheckbox" type="checkbox" /> Verbose GCode output
</label>
<span class="tooltip" name="verboseG"></span>
</li>
<li>
<label class="control">
<input id="diagonalCheckbox" type="checkbox" /> Diagonal vs Horizontal paths
</label>
<span class="tooltip" name="diagonal"></span>
</li>
<li>
<a class="github-button" href="https://github.com/lautr3k/lw.Rasterizer.js/fork" data-style="mega" data-count-href="/lautr3k/lw.Rasterizer.js/network" data-count-api="/repos/lautr3k/lw.Rasterizer.js#forks_count" data-count-aria-label="# forks on GitHub" aria-label="Fork lautr3k/lw.Rasterizer.js on GitHub">Fork</a>
<a class="github-button" href="https://github.com/lautr3k/lw.Rasterizer.js" data-icon="octicon-star" data-style="mega" data-count-href="/lautr3k/lw.Rasterizer.js/stargazers" data-count-api="/repos/lautr3k/lw.Rasterizer.js#stargazers_count" data-count-aria-label="# stargazers on GitHub" aria-label="Star lautr3k/lw.Rasterizer.js on GitHub">Star</a>
<form style="float:right;" action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIHFgYJKoZIhvcNAQcEoIIHBzCCBwMCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYCY7UiLR7aZv1NPHF52oShb9ngV/AbeGOt+OXaV2YwL+7UlGL0prNATFZXyDpSwbrMM/1fhGPtaylkNYQkl4hn4vsUqWGKLAAHBSuicCe5LIvCbsP2nZPMfe+KL9zTDgaU+SosX5idcv09Bg1mtlORgpTSlWwRGilczqOUZiUY9QzELMAkGBSsOAwIaBQAwgZMGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQIRF+NsTMau2iAcHIHSgIJIDpWf0Kf2DRIL4noZv8+Iqeh79302aUAvnMlUqiI59uM6QiFZvBSFQzw1/WrooImo8W14Hoj2t4pD/mXRyataNBlYurgJRsAmQzCFu2HC+60asAT1y9hbZkfj1T7E3895Q7MuFyK0nKSQy2gggOHMIIDgzCCAuygAwIBAgIBADANBgkqhkiG9w0BAQUFADCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20wHhcNMDQwMjEzMTAxMzE1WhcNMzUwMjEzMTAxMzE1WjCBjjELMAkGA1UEBhMCVVMxC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JKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tAgEAMAkGBSsOAwIaBQCgXTAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0xNjEwMjgxNjMwNDBaMCMGCSqGSIb3DQEJBDEWBBRqyZb7B7i4IgVq9leNDHK7q0+3oTANBgkqhkiG9w0BAQEFAASBgKZd04RtPCm3twKY2ld/ZmivOga4WTUxKYgvf0yOY3VE/gZdRRN2bLCwUxvV+7XfT8Pt/gtKGLeRu3FEX42B0O3QchU++DmmyNRPwI9/XUj4FEOG/RmLMDHm2VVqyzI58OO1MM1u0+Vgjxu6b+uZsjsMhDoPq9wUUR/z+m/wq6fJ-----END PKCS7-----">
<input type="image" src="https://www.paypalobjects.com/en_GB/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal – The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/fr_FR/i/scr/pixel.gif" width="1" height="1">
</form>
<span class="tooltip">
Three ways to contribute ;)
</span>
</li>
</ul><!-- #sidebar -->
<div id="workspace">
<div id="noFile">No file selected...</div>
<div id="fileInfo">
<span class="info">name : <span class="name"></span></span>
<span class="info">weight : <span class="weight"></span> <span class="weightUnit"></span></span>
<span class="info">input size : <span class="width"></span> x <span class="height"></span> px</span>
<span class="info">output size : <span class="realWidth"></span> x <span class="realHeight"></span> mm</span>
<span class="info jobProgress">progress : <span class="jobPercent"></span> %</span>
<span class="info jobDone">time : <span class="jobTime"></span> s</span>
<a class="control button" id="downloadButton">Download GCode</a>
<a class="control button" id="showButton">Show GCode</a>
</div>
<div id="canvasWrapper"></div>
</div><!-- #workspace -->
</div><!-- #rasterizer -->
<div id="tooltip"></div>
<div id="gCodeWrapper">
<form><a class="control button" id="closeButton">Close</a></form>
<br /><pre><code id="gCodeText"></code></pre>
</div>
<script src="js/FileSaver.min.js?v=1.3.2"></script>
<script src="js/lw.rasterizer.js?v=1.0.0"></script>
<script src="js/lw.rasterizer.help.js?v=1.0.0"></script>
<script src="js/main.js?v=1.0.0"></script>
</body>
</html>