Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...

TweenMax

.endTime()

.endTime( includeRepeats:Boolean ) : Number

Returns the time at which the animation will finish according to the parent timeline's local time.

Parameters

includeRepeats: Boolean

(default = true) — by default, repeats are included when calculating the end time but you can pass false to prevent that.

Details

Returns the time at which the animation will finish according to the parent timeline's local time. This does factor in the timeScale. For example:

var tl = new TimelineLite();
var tween = TweenLite.to(e, 1, {x:100}); //create a 1-second tween
tl.add(tween, 0.5); //insert the tween at 0.5 seconds into the timeline
console.log(tween.endTime()); //1.5
tween.timeScale(2); //double the speed of the tween, thus it'll finish in half the normal time
console.log(tween.endTime()); //1
Copyright 2017, GreenSock. All rights reserved. This work is subject to theterms of useor for Club GreenSock members, the software agreement that was issued with the membership.
×