Browse Source

MTL Loader support for map_Ks (#9308)

* MTL Loader support for map_Ks

* removed amature console log
David 9 years ago
parent
commit
8d0ca566cc
1 changed files with 12 additions and 0 deletions
  1. 12 0
      examples/js/loaders/MTLLoader.js

+ 12 - 0
examples/js/loaders/MTLLoader.js

@@ -396,6 +396,18 @@ THREE.MTLLoader.MaterialCreator.prototype = {
 
 					break;
 
+				case 'map_ks':
+
+					// Specular map
+
+					if ( params.specularMap ) break; // Keep the first encountered texture
+
+					params.specularMap = this.loadTexture( resolveURL( this.baseUrl, value ) );
+					params.specularMap.wrapS = this.wrap;
+					params.specularMap.wrapT = this.wrap;
+
+					break;
+
 				case 'ns':
 
 					// The specular exponent (defines the focus of the specular highlight)