supermedium / superframe

:package: A super collection of A-Frame components.
https://supermedium.com/superframe/
MIT License
1.38k stars 424 forks source link

loop: true; doesn't loop #134

Open alfa256 opened 6 years ago

alfa256 commented 6 years ago

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.

vincentfretin commented 6 years ago

@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.

ngokevin commented 6 years ago

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

alfa256 commented 6 years ago

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.