forked from skarab42/SLAcer.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
332 lines (317 loc) · 20 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
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
<!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>SLAcer.js (bêta)</title>
<link rel="stylesheet" type="text/css" href="vendor/jquery-ui/jquery-ui.min.css" />
<link rel="stylesheet" type="text/css" href="vendor/bootstrap/css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="vendor/bootstrap-slider/css/bootstrap-slider.min.css" />
<link rel="stylesheet" type="text/css" href="vendor/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css" />
<link rel="stylesheet" type="text/css" href="css/main.css" />
</head>
<body>
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">SLAcer.js (bêta)</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<li><a href="#">About</a></li>
<li><a href="https://github.com/lautr3k/SLAcer.js">GitHub</a></li>
</ul>
</div>
</div>
</nav><!-- .navbar -->
<div class="body container-fluid">
<div id="sidebar">
<div class="form-group">
<button id="open-viewer-2d" class="btn btn-primary" type="button">
<span class="glyphicon glyphicon-picture"></span> 2D viewer
</button>
<button id="slice-button" class="btn btn-success" type="button">
<span class="glyphicon glyphicon-align-center"></span> Slice
</button>
<button id="abort-button" class="btn btn-danger hidden" type="button">
<span class="glyphicon glyphicon-off"></span> Abort
</button>
<button id="zip-button" class="btn btn-info" type="button" disabled="disabled">
<span class="glyphicon glyphicon-compressed"></span> ZIP
</button>
</div>
<div id="transform" class="panel panel-default">
<div class="panel-heading">
<button class="panel-toggle btn btn-default btn-xs pull-right" type="button" data-toggle="collapse" data-target="#transform-body">
<span class="glyphicon glyphicon-menu-down"></span>
</button>
<h3 class="panel-title">Transformations</h3>
</div>
<div id="transform-body" class="panel-body collapse in">
<div class="form-group">
<label for="transform-action">Action</label>
<select id="transform-action" class="form-control input-sm">
<option>scale</option>
<option>rotate</option>
</select>
</div>
<div class="form-group" id="transform-uniform">
<label for="transform-uniform">Uniform</label>
<input type="radio" name="transform-uniform" id="transform-uniform-yes" value="yes" checked="checked" /> yes
<input type="radio" name="transform-uniform" id="transform-uniform-no" value="no" /> no
</div>
<div class="form-group">
<label for="transform-x">X</label>
<input type="number" id="transform-x" class="form-control input-sm" placeholder="0" />
</div>
<div class="form-group">
<label for="transform-y">Y</label>
<input type="number" id="transform-y" class="form-control input-sm" placeholder="0" />
</div>
<div class="form-group">
<label for="transform-z">Z</label>
<input type="number" id="transform-z" class="form-control input-sm" placeholder="0" />
</div>
</div>
</div><!-- #transform -->
<div id="file" class="panel panel-default">
<div class="panel-heading">
<button class="panel-toggle btn btn-default btn-xs pull-right" type="button" data-toggle="collapse" data-target="#file-body">
<span class="glyphicon glyphicon-menu-down"></span>
</button>
<h3 class="panel-title">File</h3>
</div>
<div id="file-body" class="panel-body collapse in">
<div class="form-group">
<span class="btn btn-default btn-file btn-xs">
Browse <input type="file" name="file" id="file-input" accept=".stl" />
</span>
<small>Or drop an STL file anywhere.</small>
</div>
</div>
</div><!-- #file -->
<div id="mesh" class="panel panel-default">
<div class="panel-heading">
<button class="panel-toggle btn btn-default btn-xs pull-right" type="button" data-toggle="collapse" data-target="#mesh-body">
<span class="glyphicon glyphicon-menu-down"></span>
</button>
<h3 class="panel-title">Mesh</h3>
</div>
<div id="mesh-body" class="panel-body collapse in">
<div class="info">
<span class="info-label">Faces</span>
<span class="info-value" id="mesh-faces">0</span>
</div>
<div class="info">
<span class="info-label">Width <small>(<span class="mesh-size-unit">mm</span>)</small></span>
<span class="info-value" id="mesh-size-x">0</span>
</div>
<div class="info">
<span class="info-label">Depth <small>(<span class="mesh-size-unit">mm</span>)</small></span>
<span class="info-value" id="mesh-size-y">0</span>
</div>
<div class="info">
<span class="info-label">Height <small>(<span class="mesh-size-unit">mm</span>)</small></span>
<span class="info-value" id="mesh-size-z">0</span>
</div>
<div class="info">
<span class="info-label">Volume <small>(ml)</small></span>
<span class="info-value" id="mesh-volume">0</span>
</div>
<div class="info">
<span class="info-label">Weight <small>(g)</small></span>
<span class="info-value" id="mesh-weight">0</span>
</div>
<div class="info">
<span class="info-label">Cost <small>($)</small></span>
<span class="info-value" id="mesh-cost">0</span>
</div>
</div>
</div><!-- #mesh -->
<div id="slicer" class="panel panel-default">
<div class="panel-heading">
<button class="panel-toggle btn btn-default btn-xs pull-right" type="button" data-toggle="collapse" data-target="#slicer-body">
<span class="glyphicon glyphicon-menu-down"></span>
</button>
<h3 class="panel-title">Slicer</h3>
</div>
<div id="slicer-body" class="panel-body collapse in">
<div class="info">
<span class="info-label">Layers <small>(current / total)</small></span>
<span class="info-value">
<span id="slicer-layer-value">0</span> / <span id="slicer-layers-value">0</span>
</span>
</div>
<div class="form-group">
<label for="slicer-layers-height">Layers height <small>(μm)</small></label>
<input type="number" id="slicer-layers-height" class="form-control input-sm" placeholder="100" min="1" />
</div>
<div class="form-group">
<label for="slicer-light-on">Light on delay <small>(ms)</small></label>
<input type="number" id="slicer-light-on" class="form-control input-sm" placeholder="1000" min="1" />
</div>
<div class="form-group">
<label for="slicer-light-off">Light off delay <small>(ms)</small></label>
<input type="number" id="slicer-light-off" class="form-control input-sm" placeholder="500" min="1" />
</div>
<div class="form-group">
<label for="slicer-make-zip">Make ZIP file</label>
<input type="radio" name="slicer-make-zip" id="slicer-make-zip-yes" value="yes" /> yes
<input type="radio" name="slicer-make-zip" id="slicer-make-zip-no" value="no" checked="checked" /> no
</div>
<div class="form-group">
<label for="slicer-speed">Speed mode</label>
<input type="radio" name="slicer-speed" id="slicer-speed-yes" value="yes" /> yes
<input type="radio" name="slicer-speed" id="slicer-speed-no" value="no" checked="checked" /> no
</div>
<div class="form-group">
<label for="slicer-speed-delay">Speed mode<br />delay <small>(ms)</small></label>
<input type="number" id="slicer-speed-delay" class="form-control input-sm" placeholder="100" min="1" />
</div>
</div>
</div><!-- #slicer -->
<div id="build-volume" class="panel panel-default">
<div class="panel-heading">
<button class="panel-toggle btn btn-default btn-xs pull-right" type="button" data-toggle="collapse" data-target="#build-volume-body">
<span class="glyphicon glyphicon-menu-down"></span>
</button>
<h3 class="panel-title">Build volume</h3>
</div>
<div id="build-volume-body" class="panel-body collapse in">
<div class="form-group">
<label for="build-volume-x">X <small>(width)</small></label>
<input type="number" id="build-volume-x" class="form-control input-sm" placeholder="100" min="0" />
</div>
<div class="form-group">
<label for="build-volume-y">Y <small>(depth)</small></label>
<input type="number" id="build-volume-y" class="form-control input-sm" placeholder="100" min="0" />
</div>
<div class="form-group">
<label for="build-volume-z">Z <small>(height)</small></label>
<input type="number" id="build-volume-z" class="form-control input-sm" placeholder="100" min="0" />
</div>
<div class="form-group">
<label for="build-volume-unit">unit</label>
<input type="radio" name="build-volume-unit" id="build-volume-unit-in" value="in" /> in
<input type="radio" name="build-volume-unit" id="build-volume-unit-mm" value="mm" checked="checked" /> mm
</div>
</div>
</div><!-- #build-volume -->
<div id="resin" class="panel panel-default">
<div class="panel-heading">
<button class="panel-toggle btn btn-default btn-xs pull-right" type="button" data-toggle="collapse" data-target="#resin-body">
<span class="glyphicon glyphicon-menu-down"></span>
</button>
<h3 class="panel-title">Resin</h3>
</div>
<div id="resin-body" class="panel-body collapse in">
<div class="form-group">
<label for="resin-density">Density <small>(g / cm³)</small></label>
<input type="number" id="resin-density" class="form-control input-sm" placeholder="1.1" min="0" step="0.1" />
</div>
<div class="form-group">
<label for="resin-price">Price <small>($ / l)</small></label>
<input type="number" id="resin-price" class="form-control input-sm" placeholder="50" min="0" />
</div>
</div>
</div><!-- #resin -->
<div id="screen" class="panel panel-default">
<div class="panel-heading">
<button class="panel-toggle btn btn-default btn-xs pull-right" type="button" data-toggle="collapse" data-target="#screen-body">
<span class="glyphicon glyphicon-menu-down"></span>
</button>
<h3 class="panel-title">Screen</h3>
</div>
<div id="screen-body" class="panel-body collapse in">
<div class="info">
<span class="info-label">Dot pitch <small>(mm)</small></span>
<span class="info-value" id="screen-dot-pitch">0</span>
</div>
<div class="form-group">
<label for="screen-width">Width <small>(px)</small></label>
<input type="number" id="screen-width" class="form-control input-sm" placeholder="1680" min="0" />
</div>
<div class="form-group">
<label for="screen-height">Height <small>(px)</small></label>
<input type="number" id="screen-height" class="form-control input-sm" placeholder="1050" min="0" />
</div>
<div class="form-group">
<label for="screen-diagonal-size">Diagonal size</label>
<input type="number" id="screen-diagonal-size" class="form-control input-sm" placeholder="22" min="0" />
</div>
<div class="form-group">
<label for="screen-diagonal-unit">Diagonal unit</label>
<input type="radio" name="screen-diagonal-unit" id="screen-diagonal-unit-in" value="in" checked="checked" /> in
<input type="radio" name="screen-diagonal-unit" id="screen-diagonal-unit-mm" value="mm" /> mm
</div>
</div>
</div><!-- #screen -->
<div id="colors" class="panel panel-default">
<div class="panel-heading">
<button class="panel-toggle btn btn-default btn-xs pull-right" type="button" data-toggle="collapse" data-target="#colors-body">
<span class="glyphicon glyphicon-menu-down"></span>
</button>
<h3 class="panel-title">Colors</h3>
</div>
<div id="colors-body" class="panel-body collapse in">
<div class="form-group">
<label for="mesh-color">Mesh</label>
<input type="text" id="mesh-color" class="form-control input-sm" placeholder="#555555" />
</div>
<div class="form-group">
<label for="slice-color">Slice</label>
<input type="text" id="slice-color" class="form-control input-sm" placeholder="#550000" />
</div>
</div>
</div><!-- #colors -->
</div><!-- #sidebar -->
<div id="main">
<div id="viewer3d" class="box fl">loading...</div>
</div><!-- #main -->
<div id="slider">
<span class="max">100</span>
<input id="ex4" type="text"
data-slider-min="0"
data-slider-max="100"
data-slider-step="1"
data-slider-value="0"
data-slider-tooltip="always"
data-slider-tooltip-position="left"
data-slider-orientation="vertical" />
<span class="min">0</span>
</div><!-- #main -->
</div><!-- .body -->
<div id="alert" class="alert alert-warning hidden" role="alert">
<!-- <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button> -->
<p class="message">Alert message empty...</p>
</div>
<script src="vendor/jquery-2.1.4.min.js" type="text/javascript"></script>
<script src="vendor/jquery-ui/jquery-ui.min.js" type="text/javascript"></script>
<script src="vendor/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<script src="vendor/bootstrap-slider/bootstrap-slider.min.js" type="text/javascript"></script>
<script src="vendor/bootstrap-colorpicker/js/bootstrap-colorpicker.min.js" type="text/javascript"></script>
<script src="vendor/lodash.min.js" type="text/javascript"></script>
<script src="vendor/three.min.js" type="text/javascript"></script>
<script src="vendor/earcut.js" type="text/javascript"></script>
<script src="vendor/triangulation.js" type="text/javascript"></script>
<script src="js/slacer/settings.js" type="text/javascript"></script>
<script src="js/slacer/mesh.js" type="text/javascript"></script>
<script src="js/slacer/viewer.js" type="text/javascript"></script>
<script src="vendor/OrbitControls.js" type="text/javascript"></script>
<script src="js/slacer/viewcontrols.js" type="text/javascript"></script>
<script src="js/slacer/viewer3d.js" type="text/javascript"></script>
<script src="js/slacer/viewer2d.js" type="text/javascript"></script>
<script src="js/slacer/slicer.js" type="text/javascript"></script>
<script src="js/loader/stl.js" type="text/javascript"></script>
<script src="vendor/FileSaver.min.js" type="text/javascript"></script>
<script src="vendor/jszip.min.js" type="text/javascript"></script>
<script src="js/main.js" type="text/javascript"></script>
</body>
</html>