0
我一直在试图在一个完美的圆圈中移动图像,但无法做到完美。我编写了一个盒子以方形路径旋转。代码如下。如何动画图像在框架中移动一圈?
<a-box id="box" position="-1 0.5 -3" src="images/pic2.jpg" onclick="loaddoc()" visible="true">
<a-animation attribute="position" fill="both" from="-1.0 0.5 -3" to="-2 0.5 -3" dur="5000"></a-animation>
<a-animation attribute="position" fill="both" from="-2 0.5 -3" to="-2 0.5 3" dur="5000" delay="5000"></a-animation>
<a-animation attribute="position" fill="both" from="-2.0 0.5 3" to="-1 0.5 3" dur="5000" delay="10000"></a-animation>
<a-animation attribute="position" fill="both" from="-1.0 0.5 3" to="-1 0.5 -3" dur="5000" delay="15000"></a-animation>
</a-box>
代码的后JS-小提琴。 –