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

Commit 136d24a

Browse files
Update 3DM / GLTF viewers
1 parent 10f738e commit 136d24a

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

viewers/templates/3DM Viewer.html

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1456,6 +1456,8 @@
14561456
scene.background.dispose();
14571457
scene.background = null;
14581458
}
1459+
1460+
scene.backgroundBlurriness = 0.00001;
14591461
}
14601462
}
14611463

@@ -1656,7 +1658,7 @@
16561658
set_scene_image();
16571659
}
16581660

1659-
scene.backgroundBlurriness = 0;
1661+
scene.backgroundBlurriness = 0.00001;
16601662
scene.backgroundIntensity = 1.0;
16611663

16621664
document.getElementById('back_color').disabled = false;
@@ -1702,7 +1704,7 @@
17021704

17031705
guiBlurriness = gui.add( params, 'backBlurriness', 0, 1 )
17041706
.onChange( function ( value ) {
1705-
scene.backgroundBlurriness = value;
1707+
scene.backgroundBlurriness = value === 0 ? 0.00001 : value;
17061708
mouse_wheel = true;
17071709
});
17081710

@@ -1718,8 +1720,8 @@
17181720
}
17191721

17201722
scene.environmentIntensity = params.envMapIntensity;
1721-
scene.backgroundBlurriness = params.backBlurriness;
17221723
scene.backgroundIntensity = params.backIntensity;
1724+
scene.backgroundBlurriness = params.backBlurriness === 0 ? 0.00001 : params.backBlurriness;
17231725

17241726
document.getElementById('gui_position').style.display = 'block';
17251727
set_gui_position();
@@ -2379,7 +2381,7 @@
23792381

23802382
if (scene === undefined) scene = new THREE.Scene();
23812383

2382-
scene.backgroundBlurriness = 0;
2384+
scene.backgroundBlurriness = 0.00001;
23832385
scene.backgroundIntensity = 1.0;
23842386

23852387
if (rhino_obj === undefined) rhino_obj = new THREE.Object3D();

viewers/templates/GLTF Viewer.html

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1502,6 +1502,7 @@
15021502
}
15031503

15041504
scene.environmentIntensity = 1.0;
1505+
scene.backgroundBlurriness = 0.00001;
15051506
}
15061507
}
15071508

@@ -1652,7 +1653,7 @@
16521653

16531654
gui.add( params, 'backBlurriness', 0, 1 )
16541655
.onChange( function ( value ) {
1655-
scene.backgroundBlurriness = value;
1656+
scene.backgroundBlurriness = value === 0 ? 0.00001 : value;
16561657
mouse_wheel = true;
16571658
});
16581659

@@ -1714,8 +1715,8 @@
17141715
}
17151716

17161717
scene.environmentIntensity = params.envMapIntensity;
1717-
scene.backgroundBlurriness = params.backBlurriness;
17181718
scene.backgroundIntensity = params.backIntensity;
1719+
scene.backgroundBlurriness = params.backBlurriness === 0 ? 0.00001 : params.backBlurriness;
17191720
} else {
17201721
if (gui) gui_reset();
17211722

@@ -1724,7 +1725,7 @@
17241725
set_scene_image();
17251726
}
17261727

1727-
scene.backgroundBlurriness = 0;
1728+
scene.backgroundBlurriness = 0.00001;
17281729
scene.backgroundIntensity = 1.1;
17291730

17301731
document.getElementById('file_image_input').disabled = false;
@@ -2585,7 +2586,7 @@
25852586

25862587
if (scene === undefined) scene = new THREE.Scene();
25872588

2588-
scene.backgroundBlurriness = 0;
2589+
scene.backgroundBlurriness = 0.00001;
25892590
scene.backgroundIntensity = 1.1;
25902591

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

0 commit comments

Comments
 (0)