Search code examples
javascripthtmlthree.jsaframewebvr

How to control the speed of an animation in a-frame?


<a-camera id="view">
              <a-animation attribute="position" from="30 30 30" to="-1 1.5 -2" delay="100"></a-animation>
              <a-cursor color="black"/>
  </a-camera>

I was making a project on web VR using a-frame and there I am facing a particular problem of controlling the speed of my animation effects. Does anyone have a clue? Here was the animation speed I was trying to control:


Solution

  • Just try to make the duration longer/shorter with the dur: time[ms] attribute:

    <a-animation attribute="position" from="30 30 30" to="-1 1.5 -2" delay="100" 
    dur="2000"></a-animation>
    

    Feel free to check out the docs.