superframe icon indicating copy to clipboard operation
superframe copied to clipboard

loop: true; doesn't loop

Open alfa256 opened this issue 6 years ago • 3 comments

Using master branch of kframe animation and master of aframe and animation-timeline.

<script src="https://rawgit.com/aframevr/aframe/6d3ba27/dist/aframe-master.min.js"></script>    
<script src="https://cdn.rawgit.com/ngokevin/kframe/3632f4dc/components/animation/dist/aframe-animation-component.min.js"></script>
<script src="https://cdn.rawgit.com/ngokevin/kframe/3632f4dc/components/animation-timeline/dist/aframe-animation-timeline-component.min.js" type="text/javascript"></script>
<a-timeline id="tl">
   <a-timeline-animation select="#uicross" name="spins"></a-timeline-animation>
</a-timeline>
<a-obj-model id="uicross" src="#cylui" scale="1.2 1.2 1.2" position="0 0 0" material=" src: #grid4; repeat: 3 1; alphaTest: 0.005; color: #ffa62b; shader: flat; transparent: true;"
        animation__spins="property: rotation; from: 0 0 0; to: 0 360 0; dur:1000; autoplay: false; loop: true;">
</a-obj-model>

Nothing special is being done, animation plays once and never loops, numeric values for loop have no effect. The animation by itself with autoplay: true does loop.

alfa256 avatar Mar 05 '18 02:03 alfa256

@alfa256 I had a similar issue last week. I found out loop: true only makes sense in combinaison with dir: alternate;, but this is not probably what you want for the animation. I don't know if it's possible for the animation to restart from 0 to 360, 0 to 360 etc here.

vincentfretin avatar Mar 05 '18 13:03 vincentfretin

Okay, I'll check out autoplay: false in combination with loop: true....so many permutations of properties! Need unit tests.

ngokevin avatar Mar 05 '18 13:03 ngokevin

Checked with dir: alternate; does make loop work, but what we need is clearly to restart the animation from 0 and go to 360 again.

alfa256 avatar Mar 05 '18 22:03 alfa256