Explorar o código

change Loader to accept opacity

yomotsu %!s(int64=10) %!d(string=hai) anos
pai
achega
0eecb277fb

+ 7 - 0
src/loaders/Loader.js

@@ -316,10 +316,17 @@ THREE.Loader.prototype = {
 
 		if ( m.transparency ) {
 
+			console.warn( 'transparency has been renamed to opacity' );
 			mpars.opacity = m.transparency;
 
 		}
 
+		if ( m.opacity ) {
+
+			mpars.opacity = m.opacity;
+
+		}
+
 		if ( m.specularCoef ) {
 
 			mpars.shininess = m.specularCoef;

+ 1 - 1
utils/exporters/blender/addons/io_three/constants.py

@@ -222,7 +222,7 @@ SPECULAR = 'specular'
 SPECULAR_COEF = 'specularCoef'
 SHININESS = 'shininess'
 SIDE = 'side'
-OPACITY = 'transparency'
+OPACITY = 'opacity'
 TRANSPARENT = 'transparent'
 WIREFRAME = 'wireframe'
 BLENDING = 'blending'