forked from cnr-isti-vclab/HexaLab
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
executable file
·308 lines (288 loc) · 12.4 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
<!DOCTYPE html>
<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset=utf-8>
<meta http-equiv="Content-Language" content="en">
<meta name="google" content="notranslate">
<title>HexaLab</title>
<link rel="icon" href="img/favicon.png" type="image/x-icon"/>
<link rel="stylesheet" href="css/jquery-ui.css">
<link rel="stylesheet" href="css/spectrum.css">
<link rel="stylesheet" href="css/hexalab.css">
<link href="https://fonts.googleapis.com/css?family=Raleway" rel="stylesheet">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" integrity="sha384-DNOHZ68U8hZfKXOrtjWvjxusGo9WQnrNx2sqG0tfsghAvtVlRW3tvkXWZh58N9jp" crossorigin="anonymous">
<script type="text/javascript" id="cookiebanner" src="js/external/cookiebanner.js"
data-height="20px" data-position="top" data-mask="true"
data-message="<center><br><br><br>We use technical, statistical and third parties-cookies to improve HexaLab experience. <br>We DO NOT use profiling and advertising cookies.<br>We reserve the right of tracking your usage of HexaLab for collecting statistical information in aggregate anonymous way. <br><br><b>Any 3D model loaded inside HexaLab will always stay only on your client and NO 3D data is never ever transmitted</b>.<br><br>If you use HexaLab, please cite it:<br><br><br> <b> HexaLab.net: an online viewer for hexahedral meshes<br>
Matteo Bracci, Marco Tarini, Nico Pietroni, Marco Livesu, Paolo Cignoni<br><a href='https://doi.org/10.1016/j.cad.2018.12.003'>Computer-Aided Design, Volume 110, May 2019</a></b><br><br><br>Click anywhere to acknowledge this info and start using HexaLab.</center><br><br><br>" ></script>
<script src="js/external/jquery-3.3.1.min.js"></script>
<script src="js/external/jquery-ui.min.js"></script>
<script src="js/external/jquery.dragbetter.js"></script>
<script src="js/external/spectrum.js"></script>
<script src="js/external/three.min.js"></script>
<script src="js/external/plotly.js"></script>
<script src="js/external/FileSaver.js"></script>
<script src="js/external/Stats.js"></script>
<script src="js/external/object_hash.js"></script>
<script src="js/external/jszip.min.js"></script>
<script src="js/external/js.cookie.js"></script>
<script></script>
</head>
<body>
<aside id="GUI">
<header id="toolbar" >
<h1>HexaLab</h1>
<div id="toolbar_buttons">
<button id="load_mesh" title="Open hex-mesh from local file...">
<img src="img\open_256.png" width=20 height=20 ALT="Open"></img>
</button>
<button id="process_pack" title="Open .zip file and process all contained meshes">
<img src="img\openzip_256.png" width=20 height=20 ALT="Process pack"></img>
</button>
<button id="home" title="Reset Camera">
<img src="img\icon_reload.png" width=20 height=20 ALT="Reset"></img>
</button>
<!-- button id="plot" title="Quality Histogram">
<i class="fa fa-bar-chart"></i>
</button -->
<button id="save_settings" title="Save settings (Ctrl+C to copy to clipboard)">
<img src="img\setting_save.png" width=20 height=20 ALT="Save Settings"></img>
</button>
<button id="load_settings" title="Open settings (Ctrl+V to paste from clipboard)">
<img src="img\setting_load.png" width=20 height=20 ALT="Open Settings"></img>
</button>
<button id="snapshot" title="Take a Screenshot">
<img src="img\icon_screenshot.png" width=20 height=20 ALT="Save snapshot"></img>
</button>
<button id="github" title="Info & Sources (GitHub page)">
<img src="img\github-logo.png" width=20 height=20 ALT="GitHub"></img>
</button>
<!--button id="about" title="About">
<i class="fa fa-question"></i>
</button-->
</div>
</header>
<section id="model_menu" class="menubox">
<h2>Mesh</h2>
<div class="menu_content">
<div class="menu_row">
<label>Source</label>
<div class="menu_row_input">
<select id="mesh_source">
<option value="-2" selected="selected" style="display: none;">Select a mesh source…</option>
<option value="-1">Select Local File…</option>
</select>
</div>
</div>
<div class="menu_row">
<div id="mesh_info_1" class="menu_row_infobox">
<div class="box_text">
</div>
<div class="box_buttons">
<button id="source_pdf">PDF</button>
<button id="source_web">Web</button>
<button id="source_doi">DOI</button>
</div>
</div>
</div>
<div class="menu_row">
<div class="menu_row_input">
<select id="paper_mesh_picker">
</select>
</div>
</div>
<div class="menu_row">
<div class="menu_row_infobox" id="progress_row">
<div class="box_text">
</div>
</div>
</div>
<div class="menu_row">
<div id="mesh_info_2" class="menu_row_infobox">
<div class="box_text">
</div>
</div>
</div>
</div>
</section>
<section id="plane_menu" class="menubox">
<h2>Filters</h2>
<div class="menu_row">
<label>Slice
<button id="plane_snap_camera" title="Slice in current view direction
(shift: enforce axis-aligned)">
</button>
<button class="smallplus" id="bt0" title="Plane direction params"
onclick="$('#planeDirPanel').toggle(); $('#bt0').toggleClass('checked')"
></button></label>
<div class="menu_row_input">
<div class="slider" id="plane_offset_slider"></div>
<input type="number" class="scalar_value" id="plane_offset_number">
</div>
</div>
<div class="menu_subrow" id="planeDirPanel" style="display:none">
<span class="subspacer"></span
><label class="minilabel connect">direction</label>
<button id="plane_snap_nx" class="minibutton" title="Slice along the X axis">X</button><!--
--><button id="plane_snap_ny" class="minibutton"title="Slice along the Y axis">Y</button><!--
--><button id="plane_snap_nz" class="minibutton" title="Slice along the Z axis">Z</button>
<button id="plane_swap_sign" class="minibutton" title="Flip slicing plane"><img src="img\icon_flip.png" width=13 height=12 ALT="Flip"></img></button>
<input class="scalar_value" type="number" id="plane_nx" ><!--
--><input class="scalar_value" type="number" id="plane_ny"><!--
--><input class="scalar_value" type="number" id="plane_nz">
</div>
<div class="menu_row">
<label>Peel</label>
<div class="menu_row_input">
<div class="slider" id="peeling_depth_slider">
</div><input class="scalar_value" type="number" id="peeling_depth_number">
</div>
</div>
<div class="menu_row">
<label id="quality_label">Quality ≥</label>
<div class="menu_row_input">
<div class="slider" id="quality_range_slider">
</div><input class="scalar_value" type="number" id="quality_max_number">
</div>
</div>
<div class="menu_row">
<label>Handpick</label>
<button id="pick_button" class="pickbutton" title="Handpick hexas to filter [ctrl]">dig</button>
<button id="fill_button" class="pickbutton" title="Handpick hexas to unfilter [shift]">undig</button>
<button id="isolate_button" class="pickbutton" title="Isolate one hexa (hide all else)">isolate</button>
<button id="pick_clear_button" class="pickbutton" title="Clear all handpicks">clear</button>
</div>
<hr/>
<div class="menu_row">
<label>Regularize</label>
<div class="menu_row_input">
<div class="slider" id="erode_dilate_slider"></div>
</div>
</div>
</section>
<section id="rendering_menu" class="menubox">
<h2>Rendering</h2>
<div class="menu_row">
<label>Color</label>
<select id="surface_color_source" class="miniselect">
<option value="Default" selected="selected">Default</option>
<option value="ColorMap">Hex Quality</option>
</select>
<div class="menu_row_input" id="visible_color_wrapper" style="display:none;">
<input type="text" id="visible_outside_color">
<input type="text" id="visible_inside_color">
</div>
<div class="menu_row_input" id="surface_colormap_input">
<label class="minilabel">color-map</label>
<select id="color_map" class="miniselect">
<option value="Parula" selected="selected">Parula-like</option>
<option value="Jet">Jet</option>
<option value="RedBlue">Red-Blue</option>
</select>
</div>
</div>
<div class="menu_row">
<label>Separation</label>
<select id="geometry_mode" class="miniselect">
<option value="Smooth">Roundings</option>
<option value="Cracked">Fissures</option>
<option value="DynamicLines" selected="selected">Lines</option>
<option value="Lines">Flat Lines</option>
</select>
<div class="menu_row_input">
<div class="slider" id="wireframe_slider" ></div>
<div class="slider" id="crack_size" style="display:none;"></div>
<div class="slider" id="rounding_radius" style="display:none;"> </div>
</div>
</div>
<div class="menu_row">
<div class="menu_row_input">
<label>Silhouette</label>
<div class="slider" id="filtered_slider"></div>
</div>
</div>
<div class="menu_row">
<label>Irregular</label>
<div class="menu_row_input">
<div class="slider" id="singularity_slider"></div>
</div>
</div>
<div class="menu_row">
<label>Lighting</label>
<select id="lighting_mode" class="miniselect">
<option value="AO" selected="selected">best (AO)</option>
<option value="SSAO">fast (SSAO)</option>
<option value="Direct">local only</option>
<option value="none">none</option>
</select>
<div class="menu_row_input">
</div>
</div>
</section>
<section id="log_menu" class="menubox" style="display: none;">
<h2>Log</h2>
<div class="menu_content">
<textarea id="logger" readonly></textarea>
</div>
</section>
</aside>
<main id="frame">
<div id="drag_drop_overlay" class="first_drag_drop">
<div>
<span id="drag_drop_header">Drop a file in the box below<br/> or use the menu to the side.</span>
</div>
<div id="mesh_drag_drop_area">
<div id="mesh_drag_drop_quad" class="drag_drop_quad_off">
<div id="mesh_drag_drop_content" class="drag_drop_content">
<div>Mesh</div>
<i class="fa fa-upload" aria-hidden="true"></i>
</div>
</div>
</div>
<div id="settings_drag_drop_area">
<div id="settings_drag_drop_quad" class="drag_drop_quad_off">
<div id="settings_drag_drop_content" class="drag_drop_content">
<div>Settings<br/>Snapshot</div>
<i class="fa fa-upload" aria-hidden="true"></i>
</div>
</div>
</div>
<div style="clear:both"></div>
</div>
</main>
<!-- Emscripten module -->
<script src="js/module.js"></script>
<!-- Emscripten compiled cpp code -->
<script src="js/generated/hexalab_asm.js"></script>
<!-- HexaLab -->
<script src="js/ui.js"></script>
<script src="js/shaders/ao_eval.js"></script>
<script src="js/shaders/ao_pre.js"></script>
<script src="js/shaders/ssao_eval.js"></script>
<script src="js/shaders/ssao_blur.js"></script>
<script src="js/shaders/ssao_pre.js"></script>
<script src="js/shaders/alpha_pass.js"></script>
<script src="js/shaders/alpha_wireframe.js"></script>
<script src="js/shaders/fresnel.js"></script>
<script src="js/hexalab.js"></script>
<script src="js/filters/plane_filter.js"></script>
<script src="js/filters/peeling_filter.js"></script>
<script src="js/filters/quality_filter.js"></script>
<script src="js/filters/pick_filter.js"></script>
<script src="js/external/TrackballControls.js"></script>
<script src="js/external/pngitxt-browser.min.js"></script>
<script type="text/javascript">
window.onload = function () {
var app = new HexaLab.App(document.getElementById('frame'));
app.animate();
}
</script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-8044669-5', 'auto');
ga('send', 'pageview');
</script>
</body>
</html>