Skip to content

Conversation

@tatsuya-ogawa
Copy link
Contributor

Description
I’d like to submit a PR to three.js because the TextureLoader inside FbxLoader isn’t receiving any credentials—this causes errors when loading textures.
so updated it to inherit FbxLoader’s credentials.

@tatsuya-ogawa tatsuya-ogawa changed the title textureloader inherits credentials TextureLoader inherits FbxLoader's credentials Apr 30, 2025

const textureLoader = new TextureLoader( this.manager ).setPath( this.resourcePath || path ).setCrossOrigin( this.crossOrigin );
const scope = this;
const textureLoader = new TextureLoader( this.manager ).setPath( this.resourcePath || path ).setCrossOrigin( this.crossOrigin ).setRequestHeader( scope.requestHeader ).setWithCredentials( scope.withCredentials );
Copy link
Collaborator

@Mugen87 Mugen87 Apr 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change has no effect since TextureLoader internally uses ImageLoader and this loader does not use Loader.requestHeader and Loader.withCredentials. These properties are mainly relevant for FileLoader.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Mugen87 Thank you.
I’d like to use FBXLoader with a closed site that requires authentication, so I want to replace the TextureLoader with one that supports authentication.
Would it be acceptable to add such a mechanism?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Mugen87 Mugen87 closed this Apr 30, 2025
@Mugen87 Mugen87 added this to the r177 milestone Apr 30, 2025
@tatsuya-ogawa tatsuya-ogawa deleted the fbx-loader-inherit-credentials branch April 30, 2025 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants