Closed pranav-pavithran closed 2 years ago
Does that work for other AFrame entities? Opacity is a property of the material so it seems like you'd need to target material.opacity...?
Yes. It's working on primitive entities, when i targeted components.material.material.opacity but not with troika-text
<a-entity geometry="primitive: box" material="color: red" animation="property: components.material.material.opacity; to:0; dur: 2000; easing: linear; loop: true"> </a-entity>
this one didnt work
<a-entity position="0 2 -3" troika-text="value: Hello! ;font:./MarckScript.ttf ; color:#EF2D5E" troika-text-material="shader: standard; " animation="property: components.material.material.opacity; to:0; dur: 20000; easing: linear; loop: true"> </a-entity>
I wouldn't expect property: components.material.material.opacity;
to work because there is no material
component in use. You need to find a valid path. A quick inspection shows me the following works, there may be other valid paths too...
property: components.troika-text.troikaTextMesh.material.opacity
It works, thanks.
I was trying to give a flashing animation to the text But it's not working on troika-text,
<a-troika-text animation="property: opacity; from:0; to: 1 ; loop: true; dur: 5000" color="#EF2D5E" value="Hello world!"></a-troika-text>
Same code worked on normal