Basicly,
this works:
var expl1 = new THREE.ImageUtils.loadTexture( 'images/explodes/expl1.png' );
this.material = new THREE.MeshBasicMaterial({ map: expl1, transparent:true, blending:THREE.AdditiveBlending });
And this doesnt...
var expl1 = new THREE.ImageUtils.loadTexture( 'images/explodes/expl1.png' );
this.material = new THREE.MeshBasicMaterial({ map: expl1.clone(), transparent:true, blending:THREE.AdditiveBlending });
The problem is, i have multiple objects with this texture. I want to be able to change the texture offsets of 1 of the objects without the others changing also. That's why i need clone, but the cloned texture seems to be empty.
var expl1 = new THREE.ImageUtils.loadTexture( 'images/explodes/expl1.png' );
this is only loaded once in a global variable. I could load a new texture each time i'm creating a new object, but because it's 700KB, it creates lag when loading the image.
EDIT:
THREE.ImageUtils.loadTexture()
has been replaced byloader = new THREE.TextureLoader(); loader.load()
.This is likely because
new THREE.TextureLoader().load()
sets theneedsUpdate
flag for you, while cloning does not.Do this, instead
three.js r.75