Forráskód Böngészése

Update MTLLoader.js

fix: wrong parser behavior to Tr option with parameter invertTrProperty
Wentao Lyu 7 éve
szülő
commit
6a11dfb03e
1 módosított fájl, 2 hozzáadás és 2 törlés
  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 ( n < 1 ) {
+					if ( n > 0 ) {
 
-						params.opacity = n;
+						params.opacity = 1 - n;
 						params.transparent = true;
 
 					}