Skip to content
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

LoaderUtils: Add resolveURL(). #22707

Merged
merged 3 commits into from
Oct 22, 2021
Merged

Conversation

robertlong
Copy link
Contributor

Description

This PR exposes the resolveURL function on the GLTFParser class. This makes it easier to reuse this code in GLTFLoader plugins for loading assets that use relative uris.

For example in three-omi I've copied the function into our codebase rather than reusing the three.js implementation.

@robertlong robertlong changed the title Expose resolveURL on the GLTFParser GLTFLoader: Expose resolveURL on the GLTFParser Oct 20, 2021
@Mugen87
Copy link
Collaborator

Mugen87 commented Oct 20, 2021

Would it be an option to put this method into LoaderUtils instead? It feels a bit inconsistent (regarding other loaders) to transform such helpers to public loader methods.

@robertlong
Copy link
Contributor Author

Sounds good to me! I was thinking that as well, but opted against it since it's really only used in the GLTFLoader. I'll move it over if there's support for that.

@Mugen87 Mugen87 changed the title GLTFLoader: Expose resolveURL on the GLTFParser LoaderUtils: Add resolveURL(). Oct 21, 2021
@mrdoob mrdoob added this to the r134 milestone Oct 22, 2021
@mrdoob mrdoob merged commit cd8c225 into mrdoob:dev Oct 22, 2021
@mrdoob
Copy link
Owner

mrdoob commented Oct 22, 2021

Thanks!

@joshuaellis joshuaellis mentioned this pull request Nov 2, 2021
12 tasks
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.

None yet

4 participants