Explorar o código

Update ColladaLoader.js

gero3 %!s(int64=11) %!d(string=hai) anos
pai
achega
1965e6569f
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      examples/js/loaders/ColladaLoader.js

+ 3 - 1
examples/js/loaders/ColladaLoader.js

@@ -3409,6 +3409,8 @@ THREE.ColladaLoader = function () {
 
 		}
 		
+		var keys = {'diffuse':'map', 'ambient':"lightMap" ,'specular':'specularMap'}
+		
 		for ( var prop in this ) {
 
 			switch ( prop ) {
@@ -3441,7 +3443,7 @@ THREE.ColladaLoader = function () {
 									texture.offset.y = cot.texOpts.offsetV;
 									texture.repeat.x = cot.texOpts.repeatU;
 									texture.repeat.y = cot.texOpts.repeatV;
-									props['map'] = texture;
+									props[keys[prop]] = texture;
 
 									// Texture with baked lighting?
 									if (prop === 'emission') props['emissive'] = 0xffffff;