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

Commit 842fbd3

Browse files
Update multiple viewers
1 parent 136d24a commit 842fbd3

File tree

9 files changed

+53
-32
lines changed

9 files changed

+53
-32
lines changed

viewers/templates/3DM Viewer.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1457,6 +1457,7 @@
14571457
scene.background = null;
14581458
}
14591459

1460+
scene.environmentIntensity = 1.0;
14601461
scene.backgroundBlurriness = 0.00001;
14611462
}
14621463
}

viewers/templates/3DS Viewer.html

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1465,6 +1465,9 @@
14651465
scene.background.dispose();
14661466
scene.background = null;
14671467
}
1468+
1469+
scene.environmentIntensity = 1.0;
1470+
scene.backgroundBlurriness = 0.00001;
14681471
}
14691472
}
14701473

@@ -1598,7 +1601,7 @@
15981601

15991602
gui.add( params, 'backBlurriness', 0, 1 )
16001603
.onChange( function ( value ) {
1601-
scene.backgroundBlurriness = value;
1604+
scene.backgroundBlurriness = value === 0 ? 0.00001 : value;
16021605
mouse_wheel = true;
16031606
});
16041607

@@ -1657,8 +1660,8 @@
16571660
}
16581661

16591662
scene.environmentIntensity = params.envMapIntensity;
1660-
scene.backgroundBlurriness = params.backBlurriness;
16611663
scene.backgroundIntensity = params.backIntensity;
1664+
scene.backgroundBlurriness = params.backBlurriness === 0 ? 0.00001 : params.backBlurriness;
16621665
} else {
16631666
if (gui) gui_reset();
16641667

@@ -1667,7 +1670,7 @@
16671670
set_scene_image();
16681671
}
16691672

1670-
scene.backgroundBlurriness = 0;
1673+
scene.backgroundBlurriness = 0.00001;
16711674
scene.backgroundIntensity = 1.1;
16721675

16731676
document.getElementById('back_color').disabled = false;
@@ -2340,7 +2343,7 @@
23402343

23412344
if (scene === undefined) scene = new THREE.Scene();
23422345

2343-
scene.backgroundBlurriness = 0;
2346+
scene.backgroundBlurriness = 0.00001;
23442347
scene.backgroundIntensity = 1.1;
23452348

23462349
if (tds_obj === undefined) tds_obj = new THREE.Object3D();

viewers/templates/3MF Viewer.html

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1461,6 +1461,9 @@
14611461
scene.background.dispose();
14621462
scene.background = null;
14631463
}
1464+
1465+
scene.environmentIntensity = 1.0;
1466+
scene.backgroundBlurriness = 0.00001;
14641467
}
14651468
}
14661469

@@ -1591,7 +1594,7 @@
15911594

15921595
gui.add( params, 'backBlurriness', 0, 1 )
15931596
.onChange( function ( value ) {
1594-
scene.backgroundBlurriness = value;
1597+
scene.backgroundBlurriness = value === 0 ? 0.00001 : value;
15951598
mouse_wheel = true;
15961599
});
15971600

@@ -1649,8 +1652,8 @@
16491652
});
16501653
}
16511654

1652-
scene.backgroundBlurriness = params.backBlurriness;
16531655
scene.backgroundIntensity = params.backIntensity;
1656+
scene.backgroundBlurriness = params.backBlurriness === 0 ? 0.00001 : params.backBlurriness;
16541657
} else {
16551658
if (gui) gui_reset();
16561659

@@ -1659,7 +1662,7 @@
16591662
set_scene_image();
16601663
}
16611664

1662-
scene.backgroundBlurriness = 0;
1665+
scene.backgroundBlurriness = 0.00001;
16631666
scene.backgroundIntensity = 1.1;
16641667

16651668
document.getElementById('back_color').disabled = false;
@@ -2314,7 +2317,7 @@
23142317

23152318
if (scene === undefined) scene = new THREE.Scene();
23162319

2317-
scene.backgroundBlurriness = 0;
2320+
scene.backgroundBlurriness = 0.00001;
23182321
scene.backgroundIntensity = 1.1;
23192322

23202323
if (tmf_obj === undefined) tmf_obj = new THREE.Object3D();

viewers/templates/AMF Viewer.html

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1298,6 +1298,9 @@
12981298
scene.background.dispose();
12991299
scene.background = null;
13001300
}
1301+
1302+
scene.environmentIntensity = 1.0;
1303+
scene.backgroundBlurriness = 0.00001;
13011304
}
13021305
}
13031306

@@ -1430,7 +1433,7 @@
14301433

14311434
gui.add( params, 'backBlurriness', 0, 1 )
14321435
.onChange( function ( value ) {
1433-
scene.backgroundBlurriness = value;
1436+
scene.backgroundBlurriness = value === 0 ? 0.00001 : value;
14341437
mouse_wheel = true;
14351438
});
14361439

@@ -1491,8 +1494,8 @@
14911494
});
14921495
}
14931496

1494-
scene.backgroundBlurriness = params.backBlurriness;
14951497
scene.backgroundIntensity = params.backIntensity;
1498+
scene.backgroundBlurriness = params.backBlurriness === 0 ? 0.00001 : params.backBlurriness;
14961499
} else {
14971500
if (gui) gui_reset();
14981501

@@ -1501,7 +1504,7 @@
15011504
set_scene_image();
15021505
}
15031506

1504-
scene.backgroundBlurriness = 0;
1507+
scene.backgroundBlurriness = 0.00001;
15051508
scene.backgroundIntensity = 1.0;
15061509

15071510
document.getElementById('back_color').disabled = false;
@@ -2132,7 +2135,7 @@
21322135

21332136
if (scene === undefined) scene = new THREE.Scene();
21342137

2135-
scene.backgroundBlurriness = 0;
2138+
scene.backgroundBlurriness = 0.00001;
21362139
scene.backgroundIntensity = 1.0;
21372140

21382141
if (amf_obj === undefined) amf_obj = new THREE.Object3D();

viewers/templates/ASSIMP Viewer.html

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1589,6 +1589,9 @@
15891589
scene.background.dispose();
15901590
scene.background = null;
15911591
}
1592+
1593+
scene.environmentIntensity = 1.0;
1594+
scene.backgroundBlurriness = 0.00001;
15921595
}
15931596
}
15941597

@@ -1738,7 +1741,7 @@
17381741

17391742
gui.add( params, 'backBlurriness', 0, 1 )
17401743
.onChange( function ( value ) {
1741-
scene.backgroundBlurriness = value;
1744+
scene.backgroundBlurriness = value === 0 ? 0.00001 : value;
17421745
mouse_wheel = true;
17431746
});
17441747

@@ -1800,8 +1803,8 @@
18001803
}
18011804

18021805
scene.environmentIntensity = params.envMapIntensity;
1803-
scene.backgroundBlurriness = params.backBlurriness;
18041806
scene.backgroundIntensity = params.backIntensity;
1807+
scene.backgroundBlurriness = params.backBlurriness === 0 ? 0.00001 : params.backBlurriness;
18051808
} else {
18061809
if (gui) gui_reset();
18071810

@@ -1810,7 +1813,7 @@
18101813
set_scene_image();
18111814
}
18121815

1813-
scene.backgroundBlurriness = 0;
1816+
scene.backgroundBlurriness = 0.00001;
18141817
scene.backgroundIntensity = 1.1;
18151818

18161819
document.getElementById('file_image_input').disabled = false;
@@ -2810,7 +2813,7 @@
28102813

28112814
if (scene === undefined) scene = new THREE.Scene();
28122815

2813-
scene.backgroundBlurriness = 0;
2816+
scene.backgroundBlurriness = 0.00001;
28142817
scene.backgroundIntensity = 1.1;
28152818

28162819
if (gltf_obj === undefined) gltf_obj = new THREE.Object3D();

viewers/templates/DAE Viewer.html

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1537,6 +1537,9 @@
15371537
scene.background.dispose();
15381538
scene.background = null;
15391539
}
1540+
1541+
scene.environmentIntensity = 1.0;
1542+
scene.backgroundBlurriness = 0.00001;
15401543
}
15411544
}
15421545

@@ -1677,7 +1680,7 @@
16771680

16781681
gui.add( params, 'backBlurriness', 0, 1 )
16791682
.onChange( function ( value ) {
1680-
scene.backgroundBlurriness = value;
1683+
scene.backgroundBlurriness = value === 0 ? 0.00001 : value;
16811684
mouse_wheel = true;
16821685
});
16831686

@@ -1735,8 +1738,8 @@
17351738
});
17361739
}
17371740

1738-
scene.backgroundBlurriness = params.backBlurriness;
17391741
scene.backgroundIntensity = params.backIntensity;
1742+
scene.backgroundBlurriness = params.backBlurriness === 0 ? 0.00001 : params.backBlurriness;
17401743
} else {
17411744
if (gui) gui_reset();
17421745

@@ -1745,7 +1748,7 @@
17451748
set_scene_image();
17461749
}
17471750

1748-
scene.backgroundBlurriness = 0;
1751+
scene.backgroundBlurriness = 0.00001;
17491752
scene.backgroundIntensity = 1.1;
17501753

17511754
document.getElementById('back_color').disabled = false;
@@ -2443,7 +2446,7 @@
24432446

24442447
if (scene === undefined) scene = new THREE.Scene();
24452448

2446-
scene.backgroundBlurriness = 0;
2449+
scene.backgroundBlurriness = 0.00001;
24472450
scene.backgroundIntensity = 1.1;
24482451

24492452
if (dae_obj === undefined) dae_obj = new THREE.Object3D();

viewers/templates/DST Viewer.html

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1230,6 +1230,7 @@
12301230
}
12311231

12321232
scene.environmentIntensity = 0.5;
1233+
scene.backgroundBlurriness = 0.00001;
12331234
}
12341235
}
12351236

@@ -1335,7 +1336,7 @@
13351336

13361337
guiBlurriness = gui.add( params, 'backBlurriness', 0, 1 )
13371338
.onChange( function ( value ) {
1338-
scene.backgroundBlurriness = value;
1339+
scene.backgroundBlurriness = value === 0 ? 0.00001 : value;
13391340
mouse_wheel = true;
13401341
});
13411342

@@ -1389,8 +1390,8 @@
13891390
});
13901391
}
13911392

1392-
scene.backgroundBlurriness = params.backBlurriness;
13931393
scene.backgroundIntensity = params.backIntensity;
1394+
scene.backgroundBlurriness = params.backBlurriness === 0 ? 0.00001 : params.backBlurriness;
13941395
} else {
13951396
if (gui) gui_reset( true );
13961397

@@ -1399,7 +1400,7 @@
13991400
set_scene_image();
14001401
}
14011402

1402-
scene.backgroundBlurriness = 0;
1403+
scene.backgroundBlurriness = 0.00001;
14031404
scene.backgroundIntensity = 1.1;
14041405

14051406
document.getElementById('back_color').disabled = false;
@@ -2033,7 +2034,7 @@
20332034

20342035
if (scene === undefined) scene = new THREE.Scene();
20352036

2036-
scene.backgroundBlurriness = 0;
2037+
scene.backgroundBlurriness = 0.00001;
20372038
scene.backgroundIntensity = 1.1;
20382039

20392040
if (!events_initialized) { initialize_event_listeners(); events_initialized = true; }

viewers/templates/FBX Viewer.html

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1475,6 +1475,7 @@
14751475
}
14761476

14771477
scene.environmentIntensity = 1.0;
1478+
scene.backgroundBlurriness = 0.00001;
14781479
}
14791480
}
14801481

@@ -1605,7 +1606,7 @@
16051606

16061607
gui.add( params, 'backBlurriness', 0, 1 )
16071608
.onChange( function ( value ) {
1608-
scene.backgroundBlurriness = value;
1609+
scene.backgroundBlurriness = value === 0 ? 0.00001 : value;
16091610
mouse_wheel = true;
16101611
});
16111612

@@ -1663,8 +1664,8 @@
16631664
});
16641665
}
16651666

1666-
scene.backgroundBlurriness = params.backBlurriness;
16671667
scene.backgroundIntensity = params.backIntensity;
1668+
scene.backgroundBlurriness = params.backBlurriness === 0 ? 0.00001 : params.backBlurriness;
16681669
} else {
16691670
if (gui) gui_reset();
16701671

@@ -1673,7 +1674,7 @@
16731674
set_scene_image();
16741675
}
16751676

1676-
scene.backgroundBlurriness = 0;
1677+
scene.backgroundBlurriness = 0.00001;
16771678
scene.backgroundIntensity = 1.1;
16781679

16791680
document.getElementById('back_color').disabled = false;
@@ -2479,7 +2480,7 @@
24792480

24802481
if (scene === undefined) scene = new THREE.Scene();
24812482

2482-
scene.backgroundBlurriness = 0;
2483+
scene.backgroundBlurriness = 0.00001;
24832484
scene.backgroundIntensity = 1.1;
24842485

24852486
if (fbx_obj === undefined) fbx_obj = new THREE.Object3D();

viewers/templates/GCODE Viewer.html

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -998,6 +998,9 @@
998998
scene.background.dispose();
999999
scene.background = null;
10001000
}
1001+
1002+
scene.environmentIntensity = 1.0;
1003+
scene.backgroundBlurriness = 0.00001;
10011004
}
10021005
}
10031006

@@ -1041,7 +1044,7 @@
10411044

10421045
gui.add( params, 'backBlurriness', 0, 1 )
10431046
.onChange( function ( value ) {
1044-
scene.backgroundBlurriness = value;
1047+
scene.backgroundBlurriness = value === 0 ? 0.00001 : value;
10451048
mouse_wheel = true;
10461049
});
10471050

@@ -1102,8 +1105,8 @@
11021105
});
11031106
}
11041107

1105-
scene.backgroundBlurriness = params.backBlurriness;
11061108
scene.backgroundIntensity = params.backIntensity;
1109+
scene.backgroundBlurriness = params.backBlurriness === 0 ? 0.00001 : params.backBlurriness;
11071110
} else {
11081111
if (gui) gui_reset();
11091112

@@ -1112,7 +1115,7 @@
11121115
set_scene_image();
11131116
}
11141117

1115-
scene.backgroundBlurriness = 0;
1118+
scene.backgroundBlurriness = 0.00001;
11161119
scene.backgroundIntensity = 1.0;
11171120

11181121
document.getElementById('back_color').disabled = false;
@@ -1583,7 +1586,7 @@
15831586

15841587
if (scene === undefined) scene = new THREE.Scene();
15851588

1586-
scene.backgroundBlurriness = 0;
1589+
scene.backgroundBlurriness = 0.00001;
15871590
scene.backgroundIntensity = 1.0;
15881591

15891592
if (gcode_obj === undefined) gcode_obj = new THREE.Object3D();

0 commit comments

Comments
 (0)