-
-
Notifications
You must be signed in to change notification settings - Fork 35.7k
FBXLoader: Use getHandler()
for custom texture loaders.
#31032
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FBXLoader: Use getHandler()
for custom texture loaders.
#31032
Conversation
I had a similar issue recently with KTX2Loader not passing 'path' or 'crossOrigin' options to its internal FileLoader, just haven't made a PR yet. I think probably we want to make sure that any options set on the parent loader are passed down to its internal loaders, rather than introducing a factory pattern? Perhaps don't change the PR yet, though – I'm curious if other maintainers agree. |
How about adding By default, an instance of |
@Mugen87 |
I agree with this. I would prefer not to introduce a new pattern - my expectation would always be that the settings (or intent of the settings) on the parent loader should be passed to any other child loaders. Without knowing more this sounds like a bug. Is there a reason you wouldn't want this behavior?
Where else is |
@gkjohnson Thank you.
Like this? |
That sounds even better! @tatsuya-ogawa Do you mind updating the PR with the suggested approach? If you are not familiar with the manager.addHandler( /\.tga$/i, new TGALoader() ); This would mean all TGA textures are now loaded with an instance of However, |
getHandler()
for custom texture loaders.
I'm checking e2e testcase |
…er-with-customtextureloader
I think allowing for
The problem raised in the original post doesn't sound like something that should require custom texture loader handlers to fix. |
Clean up.
@Mugen87 @gkjohnson @donmccurdy |
#31031
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 add manager.addHandler to instantiate TextureLoader.