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

BinaryLoader cross-domain loading #475

Closed
ghost opened this issue Aug 31, 2011 · 5 comments
Closed

BinaryLoader cross-domain loading #475

ghost opened this issue Aug 31, 2011 · 5 comments
Labels

Comments

@ghost
Copy link

ghost commented Aug 31, 2011

Hey.

I'm wondering if there's a way to make it possible to load a model from another domain.

Any suggestions would be great!

Thanks!

@mrdoob
Copy link
Owner

mrdoob commented Aug 31, 2011

Do you know if it's a matter of adding .crossOrigin = '' to the XMLHttpRequest? If so, we can probably add it to all the loaders.

@LukasSkywalker
Copy link

The server has to send a special header: Access-Control-Allow-Origin: *
See http://www.w3.org/TR/cors/#abstract
Or you could use a PHP-proxy.

@ghost
Copy link
Author

ghost commented Sep 26, 2011

Would it be a possibility to have JSONP loading?

E.g. load the model as JSON using JSONP, and then pass it to the Three.js lib?

@ghost
Copy link
Author

ghost commented Sep 27, 2011

I also attempted to put on the response header Access-Control-Allow-Origin: * without success. Does the request need to be special in any way?

@alteredq
Copy link
Contributor

Our models are not just JSON, they are actually web workers. Not sure which security restrictions are placed on workers.

@mrdoob mrdoob closed this as completed Feb 10, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants