ObjLoader should now support textures correctly

This commit is contained in:
Thomas FORGIONE
2015-06-12 11:07:05 +02:00
parent 99019c217f
commit 453d199c27
7 changed files with 61 additions and 18 deletions

View File

@@ -133,7 +133,7 @@ THREE.MTLLoader.MaterialCreator.prototype = {
setMaterials: function( materialsInfo ) {
this.materialsInfo = this.convert( materialsInfo );
this.materials = {};
this.materials = {};
this.materialsArray = [];
this.nameLookup = {};
@@ -255,6 +255,8 @@ THREE.MTLLoader.MaterialCreator.prototype = {
create: function ( materialName ) {
// console.log(materialName.indexOf(' ') === -1);
if ( this.materials[ materialName ] === undefined ) {
this.createMaterial_( materialName );