Skip to content
This repository was archived by the owner on Dec 18, 2025. It is now read-only.

Commit d6079f3

Browse files
Update multiple viewers
1 parent 5d585df commit d6079f3

18 files changed

+235
-510
lines changed

viewers/templates/3DM Viewer.html

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
"@monogrid/gainmap-js/decode": "https://cdn.jsdelivr.net/npm/@monogrid/[email protected]/dist/decode.min.js",
1818
"@monogrid/gainmap-js/encode": "https://cdn.jsdelivr.net/npm/@monogrid/[email protected]/dist/encode.min.js",
1919
"@monogrid/gainmap-js/libultrahdr": "https://cdn.jsdelivr.net/npm/@monogrid/[email protected]/dist/libultrahdr.min.js",
20-
"@gltf-transform/core": "https://esm.sh/@gltf-transform/core@4.0.2",
21-
"@gltf-transform/extensions": "https://esm.sh/@gltf-transform/extensions@4.0.2",
22-
"@gltf-transform/functions": "https://esm.sh/@gltf-transform/functions@4.0.2",
20+
"@gltf-transform/core": "https://esm.sh/@gltf-transform/core@4.1.0",
21+
"@gltf-transform/extensions": "https://esm.sh/@gltf-transform/extensions@4.1.0",
22+
"@gltf-transform/functions": "https://esm.sh/@gltf-transform/functions@4.1.0",
2323
"meshoptimizer_encoder": "https://cdn.jsdelivr.net/npm/[email protected]/meshopt_encoder.module.min.js",
2424
"meshoptimizer_simplifier": "https://cdn.jsdelivr.net/npm/[email protected]/meshopt_simplifier.module.min.js",
2525
"ktx2-encoder": "https://esm.sh/[email protected]"
@@ -1276,25 +1276,18 @@
12761276

12771277
let blob = await gif_encode( gif_frames );
12781278

1279-
document.getElementById('div_loading').innerHTML = '';
1280-
document.getElementById('div_loading').style.display = 'none';
1281-
12821279
context = null;
12831280
canvas = null;
12841281

12851282
zip.file( filename + '.gif', blob );
12861283
await process_zip( '_GIF' );
12871284

12881285
progress.value = 0;
1289-
document.getElementById('fixed_menu').style.display = 'block';
1286+
gif_export = false;
12901287
document.getElementById('animation_progress').style.display = 'none';
12911288
document.getElementById('div_gif_rectangle').style.display = 'none';
12921289

1293-
if (gui_set === true && document.getElementById('equi').checked) document.getElementById('gui_position').style.display = 'block';
1294-
1295-
gif_export = false;
1296-
1297-
if (render_requested === true) render();
1290+
render();
12981291

12991292
return;
13001293
}
@@ -1429,9 +1422,6 @@
14291422
// For Lossy PNG consider replacing 0 with 256
14301423
let apng = await UPNG.encode( png_frames, 500, 500, 0, frame_delay );
14311424

1432-
document.getElementById('div_loading').innerHTML = '';
1433-
document.getElementById('div_loading').style.display = 'none';
1434-
14351425
context = null;
14361426
canvas = null;
14371427

@@ -1441,13 +1431,10 @@
14411431
await process_zip( '_APNG' );
14421432

14431433
progress.value = 0;
1444-
document.getElementById('fixed_menu').style.display = 'block';
14451434
document.getElementById('animation_progress').style.display = 'none';
14461435
document.getElementById('div_gif_rectangle').style.display = 'none';
14471436

1448-
if (gui_set === true && document.getElementById('equi').checked) document.getElementById('gui_position').style.display = 'block';
1449-
1450-
if (render_requested === true) render();
1437+
render();
14511438

14521439
return;
14531440
}
@@ -3894,7 +3881,7 @@
38943881
}
38953882
} else {
38963883
if (mouse_wheel === true) {
3897-
if (count > 20) {
3884+
if (count > 30) {
38983885
mouse_wheel = false;
38993886
count = 0;
39003887
} else {

viewers/templates/3DS Viewer.html

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
"@monogrid/gainmap-js/decode": "https://cdn.jsdelivr.net/npm/@monogrid/[email protected]/dist/decode.min.js",
1818
"@monogrid/gainmap-js/encode": "https://cdn.jsdelivr.net/npm/@monogrid/[email protected]/dist/encode.min.js",
1919
"@monogrid/gainmap-js/libultrahdr": "https://cdn.jsdelivr.net/npm/@monogrid/[email protected]/dist/libultrahdr.min.js",
20-
"@gltf-transform/core": "https://esm.sh/@gltf-transform/core@4.0.2",
21-
"@gltf-transform/extensions": "https://esm.sh/@gltf-transform/extensions@4.0.2",
22-
"@gltf-transform/functions": "https://esm.sh/@gltf-transform/functions@4.0.2",
20+
"@gltf-transform/core": "https://esm.sh/@gltf-transform/core@4.1.0",
21+
"@gltf-transform/extensions": "https://esm.sh/@gltf-transform/extensions@4.1.0",
22+
"@gltf-transform/functions": "https://esm.sh/@gltf-transform/functions@4.1.0",
2323
"meshoptimizer_encoder": "https://cdn.jsdelivr.net/npm/[email protected]/meshopt_encoder.module.min.js",
2424
"meshoptimizer_simplifier": "https://cdn.jsdelivr.net/npm/[email protected]/meshopt_simplifier.module.min.js",
2525
"ktx2-encoder": "https://esm.sh/[email protected]"
@@ -1285,25 +1285,18 @@
12851285

12861286
let blob = await gif_encode( gif_frames );
12871287

1288-
document.getElementById('div_loading').innerHTML = '';
1289-
document.getElementById('div_loading').style.display = 'none';
1290-
12911288
context = null;
12921289
canvas = null;
12931290

12941291
zip.file( filename + '.gif', blob );
12951292
await process_zip( '_GIF' );
12961293

12971294
progress.value = 0;
1298-
document.getElementById('fixed_menu').style.display = 'block';
1295+
gif_export = false;
12991296
document.getElementById('animation_progress').style.display = 'none';
13001297
document.getElementById('div_gif_rectangle').style.display = 'none';
13011298

1302-
if (gui_set === true && document.getElementById('equi').checked) document.getElementById('gui_position').style.display = 'block';
1303-
1304-
gif_export = false;
1305-
1306-
if (render_requested === true) render();
1299+
render();
13071300

13081301
return;
13091302
}
@@ -1438,9 +1431,6 @@
14381431
// For Lossy PNG consider replacing 0 with 256
14391432
let apng = await UPNG.encode( png_frames, 500, 500, 0, frame_delay );
14401433

1441-
document.getElementById('div_loading').innerHTML = '';
1442-
document.getElementById('div_loading').style.display = 'none';
1443-
14441434
context = null;
14451435
canvas = null;
14461436

@@ -1450,13 +1440,10 @@
14501440
await process_zip( '_APNG' );
14511441

14521442
progress.value = 0;
1453-
document.getElementById('fixed_menu').style.display = 'block';
14541443
document.getElementById('animation_progress').style.display = 'none';
14551444
document.getElementById('div_gif_rectangle').style.display = 'none';
14561445

1457-
if (gui_set === true && document.getElementById('equi').checked) document.getElementById('gui_position').style.display = 'block';
1458-
1459-
if (render_requested === true) render();
1446+
render();
14601447

14611448
return;
14621449
}
@@ -3532,7 +3519,7 @@
35323519
}
35333520

35343521
if (mouse_wheel === true) {
3535-
if (count > 20) {
3522+
if (count > 30) {
35363523
mouse_wheel = false;
35373524
count = 0;
35383525
} else {

viewers/templates/3MF Viewer.html

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
"@monogrid/gainmap-js/decode": "https://cdn.jsdelivr.net/npm/@monogrid/[email protected]/dist/decode.min.js",
1818
"@monogrid/gainmap-js/encode": "https://cdn.jsdelivr.net/npm/@monogrid/[email protected]/dist/encode.min.js",
1919
"@monogrid/gainmap-js/libultrahdr": "https://cdn.jsdelivr.net/npm/@monogrid/[email protected]/dist/libultrahdr.min.js",
20-
"@gltf-transform/core": "https://esm.sh/@gltf-transform/core@4.0.2",
21-
"@gltf-transform/extensions": "https://esm.sh/@gltf-transform/extensions@4.0.2",
22-
"@gltf-transform/functions": "https://esm.sh/@gltf-transform/functions@4.0.2",
20+
"@gltf-transform/core": "https://esm.sh/@gltf-transform/core@4.1.0",
21+
"@gltf-transform/extensions": "https://esm.sh/@gltf-transform/extensions@4.1.0",
22+
"@gltf-transform/functions": "https://esm.sh/@gltf-transform/functions@4.1.0",
2323
"meshoptimizer_encoder": "https://cdn.jsdelivr.net/npm/[email protected]/meshopt_encoder.module.min.js",
2424
"meshoptimizer_simplifier": "https://cdn.jsdelivr.net/npm/[email protected]/meshopt_simplifier.module.min.js",
2525
"ktx2-encoder": "https://esm.sh/[email protected]"
@@ -1281,25 +1281,18 @@
12811281

12821282
let blob = await gif_encode( gif_frames );
12831283

1284-
document.getElementById('div_loading').innerHTML = '';
1285-
document.getElementById('div_loading').style.display = 'none';
1286-
12871284
context = null;
12881285
canvas = null;
12891286

12901287
zip.file( filename + '.gif', blob );
12911288
await process_zip( '_GIF' );
12921289

12931290
progress.value = 0;
1294-
document.getElementById('fixed_menu').style.display = 'block';
1291+
gif_export = false;
12951292
document.getElementById('animation_progress').style.display = 'none';
12961293
document.getElementById('div_gif_rectangle').style.display = 'none';
12971294

1298-
if (gui_set === true && document.getElementById('equi').checked) document.getElementById('gui_position').style.display = 'block';
1299-
1300-
gif_export = false;
1301-
1302-
if (render_requested === true) render();
1295+
render();
13031296

13041297
return;
13051298
}
@@ -1434,9 +1427,6 @@
14341427
// For Lossy PNG consider replacing 0 with 256
14351428
let apng = await UPNG.encode( png_frames, 500, 500, 0, frame_delay );
14361429

1437-
document.getElementById('div_loading').innerHTML = '';
1438-
document.getElementById('div_loading').style.display = 'none';
1439-
14401430
context = null;
14411431
canvas = null;
14421432

@@ -1446,13 +1436,10 @@
14461436
await process_zip( '_APNG' );
14471437

14481438
progress.value = 0;
1449-
document.getElementById('fixed_menu').style.display = 'block';
14501439
document.getElementById('animation_progress').style.display = 'none';
14511440
document.getElementById('div_gif_rectangle').style.display = 'none';
14521441

1453-
if (gui_set === true && document.getElementById('equi').checked) document.getElementById('gui_position').style.display = 'block';
1454-
1455-
if (render_requested === true) render();
1442+
render();
14561443

14571444
return;
14581445
}
@@ -3333,7 +3320,7 @@
33333320
}
33343321

33353322
if (mouse_wheel === true) {
3336-
if (count > 20) {
3323+
if (count > 30) {
33373324
mouse_wheel = false;
33383325
count = 0;
33393326
} else {

viewers/templates/AMF Viewer.html

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
"@monogrid/gainmap-js/decode": "https://cdn.jsdelivr.net/npm/@monogrid/[email protected]/dist/decode.min.js",
1818
"@monogrid/gainmap-js/encode": "https://cdn.jsdelivr.net/npm/@monogrid/[email protected]/dist/encode.min.js",
1919
"@monogrid/gainmap-js/libultrahdr": "https://cdn.jsdelivr.net/npm/@monogrid/[email protected]/dist/libultrahdr.min.js",
20-
"@gltf-transform/core": "https://esm.sh/@gltf-transform/core@4.0.2",
21-
"@gltf-transform/extensions": "https://esm.sh/@gltf-transform/extensions@4.0.2",
22-
"@gltf-transform/functions": "https://esm.sh/@gltf-transform/functions@4.0.2",
20+
"@gltf-transform/core": "https://esm.sh/@gltf-transform/core@4.1.0",
21+
"@gltf-transform/extensions": "https://esm.sh/@gltf-transform/extensions@4.1.0",
22+
"@gltf-transform/functions": "https://esm.sh/@gltf-transform/functions@4.1.0",
2323
"meshoptimizer_encoder": "https://cdn.jsdelivr.net/npm/[email protected]/meshopt_encoder.module.min.js",
2424
"meshoptimizer_simplifier": "https://cdn.jsdelivr.net/npm/[email protected]/meshopt_simplifier.module.min.js"
2525
}
@@ -1118,25 +1118,18 @@
11181118

11191119
let blob = await gif_encode( gif_frames );
11201120

1121-
document.getElementById('div_loading').innerHTML = '';
1122-
document.getElementById('div_loading').style.display = 'none';
1123-
11241121
context = null;
11251122
canvas = null;
11261123

11271124
zip.file( filename + '.gif', blob );
11281125
await process_zip( '_GIF' );
11291126

11301127
progress.value = 0;
1131-
document.getElementById('fixed_menu').style.display = 'block';
1128+
gif_export = false;
11321129
document.getElementById('animation_progress').style.display = 'none';
11331130
document.getElementById('div_gif_rectangle').style.display = 'none';
11341131

1135-
if (gui_set === true && equi_enabled === true) document.getElementById('gui_position').style.display = 'block';
1136-
1137-
gif_export = false;
1138-
1139-
if (render_requested === true) render();
1132+
render();
11401133

11411134
return;
11421135
}
@@ -1271,9 +1264,6 @@
12711264
// For Lossy PNG consider replacing 0 with 256
12721265
let apng = await UPNG.encode( png_frames, 500, 500, 0, frame_delay );
12731266

1274-
document.getElementById('div_loading').innerHTML = '';
1275-
document.getElementById('div_loading').style.display = 'none';
1276-
12771267
context = null;
12781268
canvas = null;
12791269

@@ -1283,13 +1273,10 @@
12831273
await process_zip( '_APNG' );
12841274

12851275
progress.value = 0;
1286-
document.getElementById('fixed_menu').style.display = 'block';
12871276
document.getElementById('animation_progress').style.display = 'none';
12881277
document.getElementById('div_gif_rectangle').style.display = 'none';
12891278

1290-
if (gui_set === true && equi_enabled === true) document.getElementById('gui_position').style.display = 'block';
1291-
1292-
if (render_requested === true) render();
1279+
render();
12931280

12941281
return;
12951282
}
@@ -2695,7 +2682,7 @@
26952682
}
26962683

26972684
if (mouse_wheel === true) {
2698-
if (count > 20) {
2685+
if (count > 30) {
26992686
mouse_wheel = false;
27002687
count = 0;
27012688
} else {

viewers/templates/ASSIMP Viewer.html

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
"@monogrid/gainmap-js/decode": "https://cdn.jsdelivr.net/npm/@monogrid/[email protected]/dist/decode.min.js",
1818
"@monogrid/gainmap-js/encode": "https://cdn.jsdelivr.net/npm/@monogrid/[email protected]/dist/encode.min.js",
1919
"@monogrid/gainmap-js/libultrahdr": "https://cdn.jsdelivr.net/npm/@monogrid/[email protected]/dist/libultrahdr.min.js",
20-
"@gltf-transform/core": "https://esm.sh/@gltf-transform/core@4.0.2",
21-
"@gltf-transform/extensions": "https://esm.sh/@gltf-transform/extensions@4.0.2",
22-
"@gltf-transform/functions": "https://esm.sh/@gltf-transform/functions@4.0.2",
20+
"@gltf-transform/core": "https://esm.sh/@gltf-transform/core@4.1.0",
21+
"@gltf-transform/extensions": "https://esm.sh/@gltf-transform/extensions@4.1.0",
22+
"@gltf-transform/functions": "https://esm.sh/@gltf-transform/functions@4.1.0",
2323
"meshoptimizer_encoder": "https://cdn.jsdelivr.net/npm/[email protected]/meshopt_encoder.module.min.js",
2424
"meshoptimizer_decoder": "https://cdn.jsdelivr.net/npm/[email protected]/meshopt_decoder.module.min.js",
2525
"meshoptimizer_simplifier": "https://cdn.jsdelivr.net/npm/[email protected]/meshopt_simplifier.module.min.js",
@@ -1407,25 +1407,18 @@
14071407

14081408
let blob = await gif_encode( gif_frames );
14091409

1410-
document.getElementById('div_loading').innerHTML = '';
1411-
document.getElementById('div_loading').style.display = 'none';
1412-
14131410
context = null;
14141411
canvas = null;
14151412

14161413
zip.file( filename + '.gif', blob );
14171414
await process_zip( '_GIF' );
14181415

14191416
progress.value = 0;
1420-
document.getElementById('fixed_menu').style.display = 'block';
1417+
gif_export = false;
14211418
document.getElementById('animation_progress').style.display = 'none';
14221419
document.getElementById('div_gif_rectangle').style.display = 'none';
14231420

1424-
if (gui_set === true && equi_enabled === true) document.getElementById('gui_position').style.display = 'block';
1425-
1426-
gif_export = false;
1427-
1428-
if (render_requested === true) render();
1421+
render();
14291422

14301423
return;
14311424
}
@@ -1560,9 +1553,6 @@
15601553
// For Lossy PNG consider replacing 0 with 256
15611554
let apng = await UPNG.encode( png_frames, 500, 500, 0, frame_delay );
15621555

1563-
document.getElementById('div_loading').innerHTML = '';
1564-
document.getElementById('div_loading').style.display = 'none';
1565-
15661556
context = null;
15671557
canvas = null;
15681558

@@ -1572,13 +1562,10 @@
15721562
await process_zip( '_APNG' );
15731563

15741564
progress.value = 0;
1575-
document.getElementById('fixed_menu').style.display = 'block';
15761565
document.getElementById('animation_progress').style.display = 'none';
15771566
document.getElementById('div_gif_rectangle').style.display = 'none';
15781567

1579-
if (gui_set === true && equi_enabled === true) document.getElementById('gui_position').style.display = 'block';
1580-
1581-
if (render_requested === true) render();
1568+
render();
15821569

15831570
return;
15841571
}

0 commit comments

Comments
 (0)