Преглед на файлове

ColladaLoader was not setting the emissive color property for common shader materials. It was also not setting the emissive property for an emission texture to all 1's.

John Pywtorak преди 13 години
родител
ревизия
3ba695bb1c
променени са 1 файла, в които са добавени 12 реда и са изтрити 1 реда
  1. 12 1
      src/extras/loaders/ColladaLoader.js

+ 12 - 1
src/extras/loaders/ColladaLoader.js

@@ -3045,6 +3045,9 @@ THREE.ColladaLoader = function () {
 										texture.repeat.y = cot.texOpts.repeatV;
 										texture.repeat.y = cot.texOpts.repeatV;
 										props['map'] = texture;
 										props['map'] = texture;
 
 
+										// Texture with baked lighting?
+										if ( prop == 'emission' ) props[ 'emissive' ] = 0xffffff;
+
 									}
 									}
 
 
 								}
 								}
@@ -3053,7 +3056,15 @@ THREE.ColladaLoader = function () {
 
 
 						} else if ( prop == 'diffuse' || !transparent ) {
 						} else if ( prop == 'diffuse' || !transparent ) {
 
 
-							props[ prop ] = cot.color.getHex();
+							if ( prop == 'emission' ) {
+
+								props[ 'emissive' ] = cot.color.getHex();
+
+							} else {
+
+								props[ prop ] = cot.color.getHex();
+
+							}
 
 
 						}
 						}