ImageUtils.loadTexture can't load image with full url path
I'm trying to load a image with ImageUtils.loadTexture.
The following works: THREE.ImageUtils.loadTexture( "img/me.png", THREE.UVMapping, callbackAvatar(x, y) );
The following doesn't: THREE.ImageUtils.loadTexture( "http://foobar.com/img/me.png", THREE.UVMapping, callbackAvatar(x, y) );
Any insight on why?
If full URL path is at different domain than your HTML / JS than you can't use image from there in WebGL unless that server allows anonymous CORS requests.
http://en.wikipedia.org/wiki/Cross-Origin_Resource_Sharing http://www.khronos.org/registry/webgl/specs/latest/#4.2
If it's the same server, then there may be a bug somewhere.
There was a recent bug in Webkit / Chrome about anonymous CORS requests for the same server:
https://github.com/mrdoob/three.js/issues/687
It was fixed, but maybe there is a different code path for fully specified URLs.