This is my object:
var object = new THREE.Mesh( geometry, new THREE.MeshLambertMaterial( { map: THREE.ImageUtils.loadTexture( "image.png" ) } ) );
object.position.set(2, 3, 1.5);
now after I’ve created this object in init(); function, I can directly go to the object and change his position,like this:
object.position.x = 15;
Now the question is how can I change the opacity of the texture???
Thanks 🙂
THREE.MeshLambertMaterialextendsTHREE.Materialwhich means it inherits theopacityproperty, so all you need to do is access the material on your object, and change the opacity of the material:Also note that the material must have it’s
transparentproperty set to true.(Thank you Drew and Dois for pointing this out)
Update
the property is now simply
material: