浏览代码

Update MTLLoader.js

fix: wrong parser behavior to Tr option with parameter invertTrProperty
Wentao Lyu 7 年之前
父节点
当前提交
6a11dfb03e
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      examples/js/loaders/MTLLoader.js

+ 2 - 2
examples/js/loaders/MTLLoader.js

@@ -464,9 +464,9 @@ THREE.MTLLoader.MaterialCreator.prototype = {
 
 
 					if ( this.options && this.options.invertTrProperty ) n = 1 - n;
 					if ( this.options && this.options.invertTrProperty ) n = 1 - n;
 
 
-					if ( n < 1 ) {
+					if ( n > 0 ) {
 
 
-						params.opacity = n;
+						params.opacity = 1 - n;
 						params.transparent = true;
 						params.transparent = true;
 
 
 					}
 					}