-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
273 lines (248 loc) · 10.1 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
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="Generate and preview 3D printable STLs for Gridfinity bins">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title id="page-title">Gridfinity Generator</title>
<script src="deps/three.min.js" defer></script>
<script src="deps/Projector.js" defer></script>
<script src="deps/stl_viewer.min.js" defer></script>
<script src="deps/webgl_detector.js" defer></script>
<script src="deps/OrbitControls.js" defer></script>
<script src="deps/parser.min.js" defer></script>
<script src="deps/TrackballControls.js" defer></script>
<script src="deps/CanvasRenderer.js" defer></script>
<script src="browserfs.min.js" defer></script>
<link rel="stylesheet" type="text/css" href="css/normalize.css">
<link rel="stylesheet" href="css/hack.css">
<link rel="stylesheet" href="css/themes/dark.css">
<link rel="stylesheet" href="css/themes/standard.css">
<link rel="stylesheet" href="css/cooltipz.min.css">
<script src="filesystem.js" defer></script>
<script type="module" src="main.js" defer></script>
<link rel="stylesheet" href="coloris/coloris.css" />
<script src="coloris/coloris.js"></script>
<link rel="stylesheet" href="css/custom_styles.css">
</head>
<body class="hack standard">
<div class="main container-moi">
<h1 class="header-message">Gridfinity Generator
<span id="header-message" class="header-message"></span>
</h1>
<div class="grid">
<div class="cell -6of12">
<div class="btn-group btn-block">
<button id="reset_default" class="btn-link-correct btn btn-default btn-block">Defaults ⟳</button>
<button id="render" class="btn btn-primary btn-block">Render</button>
<button id="kill" class="btn btn-error btn-block">Kill</button>
</div>
<br>
<div class="form-group">
<div class="cell param-item-moi">
<label for="width">
<span aria-label="Width along x-axis, in multiples of 42mm (grid size)"
class="cooltipz--down cooltipz--large">
ⓘ
</span>
Width (✕42mm):
</label>
<input id="width" type="number" class="form-control">
</div>
<div class="cell param-item-moi">
<label for="depth">
<span aria-label="Depth along y-axis, in multiples of 42mm (grid size)"
class="cooltipz--down cooltipz--large">
ⓘ
</span>
Depth (✕42mm):
</label>
<input id="depth" type="number" class="form-control">
</div>
<div class="cell param-item-moi">
<label for="height">
<span aria-label="Height, in multiples of 7mm"
class="cooltipz--down cooltipz--large">
ⓘ
</span>
Height (✕7mm):
</label>
<input id="height" type="number" class="form-control">
</div>
<div class="cell param-item-moi">
<label for="wall_thickness">
<span aria-label="Thickness of outer wall in mm"
class="cooltipz--down cooltipz--large">
ⓘ
</span>
Wall Thickness:
</label>
<input id="wall_thickness" type="number" class="form-control">
</div>
<div class="cell param-item-moi">
<label for="lip_style">
<span aria-label="Style of lip at top of walls"
class="cooltipz--down cooltipz--large">
ⓘ
</span>
Wall Lip Style:
</label>
<select id="lip_style" class="form-control">
<option>Normal</option>
<option>Reduced</option>
<option>None</option>
</select>
</div>
<div class="cell param-item-moi">
<label for="magnet_diameter">
<span aria-label="Diameter of hole for magnet insertion, 0 omits the hole"
class="cooltipz--down cooltipz--large">
ⓘ
</span>
Magnet Diameter:
</label>
<input id="magnet_diameter" type="number" class="form-control">
</div>
<div class="cell param-item-moi">
<label for="screw_depth">
<span aria-label="Depth of narrow screw hole, 0 omits the hold"
class="cooltipz--down cooltipz--large">
ⓘ
</span>
Screw Depth:
</label>
<input id="screw_depth" type="number" class="form-control">
</div>
<div class="cell param-item-moi">
<label for="chambers">
<span aria-label="Number of subdivisions along x-axis (uniformly distributed)"
class="cooltipz--down cooltipz--large">
ⓘ
</span>
Chambers:
</label>
<input id="chambers" type="number" class="form-control">
</div>
<div class="cell param-item-moi">
<label for="withLabel">
<span aria-label="Position of overhang for label, can also exclude an overhang"
class="cooltipz--down cooltipz--large">
ⓘ
</span>
Label Position:
</label>
<select id="withLabel" class="form-control">
<option>No Label</option>
<option>Left</option>
<option>Right</option>
<option>Center</option>
<option>Left Chamber</option>
<option>Right Chamber</option>
<option>Center Chamber</option>
</select>
</div>
<div class="cell param-item-moi">
<label for="labelWidth">
<span aria-label="Width of label, in multiples of 42mm (grid size), 0 is full length"
class="cooltipz--down cooltipz--large">
ⓘ
</span>
Label Width:
</label>
<input id="labelWidth" type="number" class="form-control">
</div>
<div class="cell param-item-moi">
<label for="hole_overhang_remedy">
<span aria-label="If both screw and magnet are defined, include feature for better printing of magnet/screw overhang"
class="cooltipz--down cooltipz--large">
ⓘ
</span>Overhang Hold Fix:
</label>
<input id="hole_overhang_remedy" class="form-control" type="checkbox">
</div>
<div class="cell param-item-moi">
<label for="fingerslide">
<span aria-label="Include large corner fillet on the front, to make removing items easier"
class="cooltipz--down cooltipz--large">
ⓘ
</span>Finger Slide:
</label>
<input id="fingerslide" class="checkmark form-control" type="checkbox">
</div>
<div class="cell param-item-moi">
<label for="efficient_floor">
<span aria-label="Efficient floor option saves material and time, but the floor is not smooth (only applies if no magnets, screws, or finger-slide used)"
class="cooltipz--down cooltipz--large">
ⓘ
</span>Efficient Floor:
</label>
<input class="form-control" id="efficient_floor" type="checkbox">
<div ></div>
</div>
<div class="cell param-item-moi">
</div>
</div>
</div>
<br>
<br>
<br>
<!-- SECOND COLUMN -->
<div class="cell -6of12">
<div class="btn-group btn-block">
<a id="download-link" class="btn btn-success btn-ghost btn-block" href="">Download</a>
<button id="autorotate" class="btn-link-correct btn btn-default btn-block">Rotate</button>
<button id="render-info" class="btn btn-default btn-ghost btn-block">Info</button>
<button id="viewer-settings" class="btn btn-default btn-block btn-ghost">⚙</button>
</div>
<br>
<div class="settings-menu hide -6of12" id="settings-menu">
<div class="card">
<header class="card-header">Settings</header>
<div class="card-content">
<div class="inner">
Background: <input id="bg-color" class="inputcolor" type="text" value="#eeeeee" data-coloris> <br><br>
STL Render: <input id="stl-color" class="inputcolor" type="text" value="#7f869c" data-coloris> <br><br>
Grid Lines: <input id="gridlines" class="inputcolor" type="checkbox">
</div>
</div>
</div>
</div>
<div class="settings-menu hide -6of12" id="render-info-menu">
<div class="card">
<header class="card-header">STLViewer Info</header>
<div class="card-content">
<div class="inner">
<span id="logs">No Info</span>
</div>
</div>
</div>
</div>
<div>
</div>
<br>
<div id="viewer" class="stl-viewer" tabindex="0"></div>
<span id="features"></span>
</div>
</div>
<div class="-6of12 hack">
<h2>
Credits and Info:
</h2>
All credit goes to their respective owners, all mistakes and fuckups are mine. <br>
<a href="https://zackfreedman.com/">Zack Freedman</a> - Creator of Gridfinity <br>
<a href="https://github.com/vector76">Vector76 (Jamie)</a> - Made the web based editor for gridfinity this is based on and the OpenSCAD file<br>
<a href="https://sukima.github.io/hackcss-ext/">hack.css</a> - CSS theme template for this site <br>
<a href="https://github.com/ochafik/openscad-wasm">Ochafik</a> - For OpenSCAD Web Assembly <br>
<br>
This was made just for fun over a weekend, as an intro to basic webdev stuff for me <br>
it is an abominable mix of code, but it hopefully works <br>
<br>
Source code (it's not a good read): <a href="https://github.com/Hamza-Anver/Gridfinity-Generator">https://github.com/Hamza-Anver/Gridfinity-Generator</a>
<br>
<br>
MIT License (see Github Page)
<br>
</div>
</div>
<noscript>JavaScript is needed for Gridfinity Generator to work</noscript>
</body>
</html>