<html> <head> <script src="https://aframe.io/releases/1.0.4/aframe.min.js"></script> </head> <body> <a-scene> <a-box color="blue" position="0 3 -5" rotation="0 45 45" scale="1 1 1" animation__rotation="property: rotation; to: 360 405 45; dur: 1000; startEvents: click;"> </a-box> <!-- camera && mouse --> <a-camera> <a-cursor></a-cursor> </a-camera> </a-scene> </body></html>我是 A-frame 的新手,我正在嘗試在<a-box>. 預期的行為應該是:每次單擊立方體后,立方體都應該做一個旋轉動畫。但是我遇到了一個問題:只有第一次單擊會觸發旋轉動畫,其余的單擊事件將不起作用。我想要實現的是一鍵應該映射到一個動畫。上面提供了代碼片段。我該如何解決這個問題?
每次觸發A幀點擊事件如何觸發相關動畫?
心有法竹
2022-10-21 11:07:20