Skip to content

Commit 4f4c11a

Browse files
authored
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
1 parent 0f0d05d commit 4f4c11a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

examples/jsm/loaders/3DMLoader.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -944,15 +944,13 @@ function Rhino3dmWorker() {
944944

945945
if ( _pbrMaterial.supported ) {
946946

947-
console.log( 'pbr true' );
948-
949947
for ( let j = 0; j < pbrTextureTypes.length; j ++ ) {
950948

951-
const _texture = _material.getTexture( textureTypes[ j ] );
949+
const _texture = _material.getTexture( pbrTextureTypes[ j ] );
952950
if ( _texture ) {
953951

954952
const image = doc.getEmbeddedFileAsBase64( _texture.fileName );
955-
let textureType = textureTypes[ j ].constructor.name;
953+
let textureType = pbrTextureTypes[ j ].constructor.name;
956954
textureType = textureType.substring( 12, textureType.length );
957955
const texture = { type: textureType, image: 'data:image/png;base64,' + image };
958956
textures.push( texture );

0 commit comments

Comments
 (0)