浏览代码

3dmLoader: Fix bug in texture type checking (#21784)

* extract name and value properties from objects

* Extract object userStrings

* 3dmLoader: refactor es6

* Remove unnecessary imports.

* adding some error catching related to PBR mats

* fix bug in texturetype checking
Luis E. Fraguada 4 年之前
父节点
当前提交
4f4c11a1af
共有 1 个文件被更改,包括 2 次插入4 次删除
  1. 2 4
      examples/jsm/loaders/3DMLoader.js

+ 2 - 4
examples/jsm/loaders/3DMLoader.js

@@ -944,15 +944,13 @@ function Rhino3dmWorker() {
 
 			if ( _pbrMaterial.supported ) {
 
-				console.log( 'pbr true' );
-
 				for ( let j = 0; j < pbrTextureTypes.length; j ++ ) {
 
-					const _texture = _material.getTexture( textureTypes[ j ] );
+					const _texture = _material.getTexture( pbrTextureTypes[ j ] );
 					if ( _texture ) {
 
 						const image = doc.getEmbeddedFileAsBase64( _texture.fileName );
-						let textureType = textureTypes[ j ].constructor.name;
+						let textureType = pbrTextureTypes[ j ].constructor.name;
 						textureType = textureType.substring( 12, textureType.length );
 						const texture = { type: textureType, image: 'data:image/png;base64,' + image };
 						textures.push( texture );