mrdoob/three.js — pull request #4807 by nthitz (2014-05-13 03:14:35+00:00)
Title: Texture loader callbacks

Fixes https://github.com/mrdoob/three.js/issues/4803

I've modified the TextureLoader to pass it's onProgress and onError callbacks to the ImageLoader. I think this should be sufficient for the correct use of the arguments. I've included an example is this is my first code pull request to three.js. The example is pretty trivial, so you might consider omitting it.

The one thing that is a bit ambiguous is how the LoadingManagers handle errors. Their onLoad will never call if anything errors out. Not sure the best course of action there. Could be modified to support error conditions I suppose?

I noticed similar issues with BufferGeometryLoader, MaterialLoader & ObjectLoader. I could go ahead and add these changes to those as well? I wasn't using those, so that's why I initially focused on TextureLoader. Let me know and I can make those changes easily. Thanks!!

(This is my first code pull request to three.js, so please let me know if I'm doing something horribly wrong! :)