Selaa lähdekoodia

Editor:Fix determine if colorSpace needs to be modified (#27548)

gitplus 1 vuosi sitten
vanhempi
commit
5953d4232d
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      editor/js/Sidebar.Material.MapProperty.js

+ 1 - 1
editor/js/Sidebar.Material.MapProperty.js

@@ -114,7 +114,7 @@ function SidebarMaterialMapProperty( editor, property, name ) {
 
 		if ( texture !== null ) {
 
-			if ( colorMaps[ property ] !== undefined && texture.isDataTexture !== true && texture.colorSpace !== THREE.SRGBColorSpace ) {
+			if ( colorMaps.includes( property ) && texture.isDataTexture !== true && texture.colorSpace !== THREE.SRGBColorSpace ) {
 
 				texture.colorSpace = THREE.SRGBColorSpace;
 				material.needsUpdate = true;