Expose GLTFLoader _rootURL property for extensions

The _rootURL property of GLTFLoader is private, but used in the loadUriAsync method of the loader. If an extension is added for this method that wants to change processing, there is no way to access the rootURL to find the complete URL for making a request.

Requesting the _rootURL property is exposed, or passed as a parameter into loadUriAsync that can be accessed by an extension.

Use Case: Currently trying to de-dupe URI requests between loader instances that request the same material at the same URL, but cannot verify the content is the same without access to the entire request URL.

cc @bghgary

Exposing it as a get property is reasonable. Do you want to create a PR?

I have made one
https://github.com/BabylonJS/Babylon.js/pull/14673

2 Likes

I merged it. Thanks for contributing!

1 Like