浏览代码

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

gitplus 1 年之前
父节点
当前提交
5953d4232d
共有 1 个文件被更改,包括 1 次插入1 次删除
  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;