Aframe 改变动画';s';至';在js中';在发出事件以触发效果时不起作用
我正在尝试播放此父摄影机实体的短旋转动画。我有以下a动画:Aframe 改变动画';s';至';在js中';在发出事件以触发效果时不起作用,aframe,Aframe,我正在尝试播放此父摄影机实体的短旋转动画。我有以下a动画: <a-animation attribute="rotation" dur="1000" to="0 163.5761975835419 0" fill="forwards" begin="rotateCam"></a-animation> 例如,。v0.5.0 谢谢您的时间。经过一些研究,并与dirkk0就A帧松弛进行了交谈,很明显他们将采用基于组件的方法。我已更改代码以应用ngokevin的动画组件,它解决
<a-animation attribute="rotation" dur="1000" to="0 163.5761975835419 0" fill="forwards" begin="rotateCam"></a-animation>
例如,。v0.5.0
谢谢您的时间。经过一些研究,并与dirkk0就A帧松弛进行了交谈,很明显他们将采用基于组件的方法。我已更改代码以应用ngokevin的动画组件,它解决了我的问题!:)
HTML:
在进行了一些研究并与Dirk0就A型架松弛问题进行了交谈后,很明显他们将采用基于组件的方法。我已更改代码以应用ngokevin的动画组件,它解决了我的问题!:)
HTML:
<a-scene>
<a-sphere position="0 1.25 -5" radius="1.25" color="#EF2D5E"></a-sphere>
<a-box position="-1 0.5 -3" width="1" height="1" depth="1" color="#4CC3D9" animation="property: rotation; dur: 1000; startEvents: rotateBox"></a-box>
<a-cylinder position="1 0.75 -3" radius="0.5" height="1.5" color="#FFC65D"></a-cylinder>
<a-plane position="0 0 -4" rotation="-90 0 0" width="4" height="4" color="#7BC8A4"></a-plane>
<a-sky color="#ECECEC"></a-sky>
</a-scene>
setTimeout(() => {
let box = document.querySelector('a-box');
box.setAttribute('animation', 'to', '0 20 0');
box.emit('rotateBox');
}, 2000);