Просмотр исходного кода

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

gitplus 2 лет назад
Родитель
Сommit
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 ( 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;

粤ICP备19079148号