Skip to content

Commit

Permalink
Remove outdated texture fallback.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mugen87 committed Jan 25, 2024
1 parent 69fde61 commit 302f1e8
Showing 1 changed file with 2 additions and 18 deletions.
20 changes: 2 additions & 18 deletions M2Loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ class M2Loader extends Loader {

// load textures and skin data asynchronously

const textures = await Promise.all( this._loadTextures( textureDefinitions, textureLoader, name, chunks ) );
const textures = await Promise.all( this._loadTextures( textureDefinitions, textureLoader, chunks ) );
const skinData = await this._loadSkin( header, parser, skinLoader, name, chunks );

// build scene
Expand Down Expand Up @@ -1126,7 +1126,7 @@ class M2Loader extends Loader {

}

_loadTextures( textureDefinitions, loader, name, chunks ) {
_loadTextures( textureDefinitions, loader, chunks ) {

const promises = [];

Expand All @@ -1149,22 +1149,6 @@ class M2Loader extends Loader {

}

// fallback: if the first texture has an empty name, use .m2 name

if ( filename === '' ) {

if ( i === 0 ) {

filename = ( name + '.blp' ).toLowerCase();

} else {

continue;

}

}

//

const promise = new Promise( ( resolve, reject ) => {
Expand Down

0 comments on commit 302f1e8

Please sign in to comment.