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

make loaders' load() to return stuff. #8091

Closed
makc opened this issue Feb 8, 2016 · 4 comments
Closed

make loaders' load() to return stuff. #8091

makc opened this issue Feb 8, 2016 · 4 comments

Comments

@makc
Copy link
Contributor

makc commented Feb 8, 2016

For example, if XHRLoader's load() returns XMLHttpRequest, but VRMLLoader's load() does not return it (swallows it), so there is no easy way to call .abort() on underlying XMLHttpRequest, for example.

Same goes for OBJLoader, ColladaLoader(1 and 2), STLLoader, I am bored to check more loader, etc

@mrdoob
Copy link
Owner

mrdoob commented Feb 8, 2016

Returning the request sounds good to me.

@makc
Copy link
Contributor Author

makc commented Feb 8, 2016

My original idea stems from, as you guessed it, the need to abort loading. But if the model is multi-part (such as geometry + textures) it might not be enough (or too late) to abort XMLHttpRequest. Maybe there is better way to address this? Maybe via THREE.LoadingManager? It does not manage much now beyond tracking loading progress.

@gabrielcramer
Copy link

You may find this PR interesting. #9600
It allows you to abort all active requests using the LoadingManager.
To abort a single request we may store the current request inside every Loader.

@makc
Copy link
Contributor Author

makc commented Sep 28, 2016

closing in favor of #9600 if it does what it says

It allows you to abort all active requests using the LoadingManager

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

No branches or pull requests

3 participants