0
votes

I import a animated gltf 2.0 model in a A-Frame scene.

I want to set its opacity to 0.5. But it doen't work, even I try to modify the value with object3D class.

Hier is the demo project on glitch: https://glitch.com/edit/#!/animated-gltf-opacity

Thanks for any help.

1

1 Answers

1
votes

You need to wait until the model is loaded, throw Your code to an event listener:

this.el.addEventListener("model-loaded", (e)=>{//change opacity})

Check it out here.