Skip to content

Commit

Permalink
FBXLoader: Support loading DDS textures. (#27204)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mugen87 committed Nov 17, 2023
1 parent 034181b commit 4567ece
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions examples/jsm/loaders/FBXLoader.js
Expand Up @@ -445,6 +445,22 @@ class FBXTreeParser {

}

} else if ( extension === 'dds' ) {

const loader = this.manager.getHandler( '.dds' );

if ( loader === null ) {

console.warn( 'FBXLoader: DDS loader not found, creating placeholder texture for', textureNode.RelativeFilename );
texture = new Texture();

} else {

loader.setPath( this.textureLoader.path );
texture = loader.load( fileName );

}

} else if ( extension === 'psd' ) {

console.warn( 'FBXLoader: PSD textures are not supported, creating placeholder texture for', textureNode.RelativeFilename );
Expand Down

0 comments on commit 4567ece

Please sign in to comment.