recent
recent( ):[Tween | Timeline | Callback]
返回最近添加的子补间动画/时间轴/回调,无论其在时间轴中的位置如何。
细节
返回最近添加的子补间动画、时间轴或回调函数,无论其在时间轴中的位置如何。
var tl = gsap.timeline();
//very long tween
tl.to(e1, { duration: 999, x: 100, repeat: 5 });
//insert this tween at 0.5 seconds (toward the beginning of the timeline)
tl.to(e2, { duration: 1, y: 200 }, 0.5);
//inserts the new tween 3 seconds after the e2 tween which was added most recently.
tl.to(e3, { duration: 1, scaleX: 2 }, tl.recent().endTime() + 3);