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
Dev #6649
Dev #6649
Conversation
I like it! Thanks ^^ |
|
Good catch. I think
I think it's correct as it is...? |
I'm not too sure what purpose this serves. Either way, for the purpose of calling
|
Actually, I guess this evolved from https://github.com/mrdoob/three.js/blob/dev/src/loaders/ImageLoader.js#L24 |
@mrdoob You are right. |
So I the main thing I added was returning the XMLHttpRequest object from the XHRLoader. This gives other loaders that use the XHRLoader object (such as STLLoader) access to the XMLHttpRequest object. Therefore allowing manipulation of the XMLHttpRequest object and access to the built in functions of the object. Mainly XMLHttpRequest.abort() so when using STLLoader one can cancel the load by calling abort on the request object. Issues #6641 and #6634 are relevant here.
Here's an example of code for how the changes can be useful.
I only added to the STLLoader in examples > js but this can be easily added to the any other loaders that use XHRLoader.