It seems like more of a JavaScript syntax issue than a Three.js problem, but I'm stuck. I have an object called "o = {}", with textures stored in this format:
o = {
...
textures: {
one: {
low: { t: new THREE.Texture(), url: 'http://i.imgur.com/tJ0uJPt.jpg' },
normal: { t: new THREE.Texture(), url: 'http://i.imgur.com/wBB1nZN.jpg' }
},
two: {
low: { t: new THREE.Texture(), url: 'http://i.imgur.com/9JaoZNA.jpg' },
normal: { t: new THREE.Texture(), url: 'http://i.imgur.com/p9wO18t.jpg' },
hd: ...,
etc..
}
etc..
}
...
}
I need a function to load all these textures using THREE.ImageLoader. Additionally, once all the textures are loaded, I want to run the o.texturesOnLoad(); function.
This is what I have so far http://jsfiddle.net/NEXny/5/, but only the last texture in o.textures is working. I think I might be passing variables incorrectly to loader.load( ... );
I hope someone can assist me, thank you.