Reputation: 1533
HTML
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
CSS
.box{
width: 50px;
height: 50px;
background: rgb(107,127,125);
border: 1px solid rgb(174,77,61);
display: block;
}
JS
var tl = new TimelineMax();
tl.staggerTo($(".box"), 1, {x: "200px"}, 0.4);
I want to gradually increase the speed at which the boxes are animated to the right. i e:
I know I could loop through the boxes and specify a different duration for each, but is there a more efficient way of doing this?
Is it possible to apply a predefined ease like
ease: Bounce.easeOut
to the timeline itself, not to each tween in the timeline?
Upvotes: 1
Views: 109
Reputation: 18546
You could use timeScale()
to accelerate the timeline after each stagger. Here's an example.
function tweenComplete() {
scale += 1;
tl.timeScale(scale);
}
Upvotes: 1