循环部分补间与tween.js [英] Loop part of a tween with tween.js
本文介绍了循环部分补间与tween.js的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是Tween.js中的一个简单补间。间隔后发生一个简单的循环。
Here's a simple tween in Tween.js. A simple loop happens after an interval.
cjs.Tween.get(mySymbol).wait(50).to({x:10}).to({x:0});
有没有办法让它在间隔后重复说5次而不重复间隔?
Is there a way to make it repeat say 5 times after the interval, without repeating the interval?
通过添加 loop:true
我可以让它循环但循环包括wait()。
By adding loop:true
I can make it loop but the loop would include the wait().
cjs.Tween.get(mySymbol, {loop:true}).wait(50).to({x:10}).to({x:0});
有没有办法在Tween.js中按顺序添加补间到时间轴?
Is there any way to add tweens to the timeline sequentially in Tween.js?
推荐答案
回答由Grant Skinner提供:
Answer courtesy of Grant Skinner:
cjs.Tween.get(ball).wait(1000).play(
cjs.Tween.get(ball,{paused:true, loop:true})
.to({x:450},1000)
.to({x:50},1000)
);
这篇关于循环部分补间与tween.js的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文