I have been experimenting with A-Frame and Socket.io recently.
I have successfully managed to rotate a cube/box statically using the following HTML code:
<a-box position="-1 0.5 -3" rotation="0 0 0" color="#4CC3D9">
<a-animation id="cubeAnimation" attribute="rotation" from="0 0 0" to="270 0 0" dur="2000" direction="alternate" begin="playAnimation"></a-animation>
</a-box>
While I can trigger the playAnimation function with JavaScript, I am struggling to dynamically change the 'to' parameters for rotation using JavaScript or AngularJS.
If anyone has any advice or solutions on how to set the 'to' attribute via JavaScript, I would greatly appreciate it. I have tried various approaches without success.
Thank you.