Explorar el Código

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

gitplus hace 2 años
padre
commit
5953d4232d
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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 ( 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;
 				texture.colorSpace = THREE.SRGBColorSpace;
 				material.needsUpdate = true;
 				material.needsUpdate = true;

粤ICP备19079148号