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

Commit bfaf7c6

Browse files
Update multiple viewers
1 parent 49c9440 commit bfaf7c6

File tree

3 files changed

+27
-6
lines changed

3 files changed

+27
-6
lines changed

viewers/templates/GLTF WebGPU.html

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1896,8 +1896,15 @@
18961896

18971897
if (equi_enabled === true) {
18981898
png_tex.mapping = THREE.EquirectangularReflectionMapping;
1899-
scene.background = png_tex.clone();
1900-
scene.environment = png_tex.clone();
1899+
png_tex.needsUpdate = true;
1900+
1901+
if (gpu === false) {
1902+
scene.background = png_tex.clone();
1903+
scene.environment = png_tex.clone();
1904+
} else {
1905+
scene.backgroundNode = THREE.texture( png_tex.clone(), THREE.equirectUV(), 0 );
1906+
scene.environmentNode = THREE.texture( png_tex.clone(), THREE.equirectUV(), 0 );
1907+
}
19011908
} else {
19021909
scene.background = png_tex.clone();
19031910
}

viewers/templates/OBJ WebGPU.html

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2765,8 +2765,15 @@
27652765

27662766
if (equi_enabled === true) {
27672767
png_tex.mapping = THREE.EquirectangularReflectionMapping;
2768-
scene.background = png_tex.clone();
2769-
scene.environment = png_tex.clone();
2768+
png_tex.needsUpdate = true;
2769+
2770+
if (gpu === false) {
2771+
scene.background = png_tex.clone();
2772+
scene.environment = png_tex.clone();
2773+
} else {
2774+
scene.backgroundNode = THREE.texture( png_tex.clone(), THREE.equirectUV(), 0 );
2775+
scene.environmentNode = THREE.texture( png_tex.clone(), THREE.equirectUV(), 0 );
2776+
}
27702777
} else {
27712778
scene.background = png_tex.clone();
27722779
}

viewers/templates/PDB WebGPU.html

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1762,8 +1762,15 @@
17621762

17631763
if (equi_enabled === true) {
17641764
png_tex.mapping = THREE.EquirectangularReflectionMapping;
1765-
scene.background = png_tex.clone();
1766-
scene.environment = png_tex.clone();
1765+
png_tex.needsUpdate = true;
1766+
1767+
if (gpu === false) {
1768+
scene.background = png_tex.clone();
1769+
scene.environment = png_tex.clone();
1770+
} else {
1771+
scene.backgroundNode = THREE.texture( png_tex.clone(), THREE.equirectUV(), 0 );
1772+
scene.environmentNode = THREE.texture( png_tex.clone(), THREE.equirectUV(), 0 );
1773+
}
17671774
} else {
17681775
scene.background = png_tex.clone();
17691776
}

0 commit comments

Comments
 (0)