SimpleTimeline

SimpleTimeline is the base class for TimelineLite and TimelineMax, providing the most basic timeline functionality and it is used for the root timelines in TweenLite but is only intended for internal use in the GreenSock tweening platform. It is meant to be very fast and lightweight.

Constructor

SimpleTimeline ;

Constructor

Properties

autoRemoveChildren : Boolean

If true, child tweens/timelines will be removed as soon as they complete.

data : *

A place to store any data you want (initially populated with vars.data if it exists).

smoothChildTiming : Boolean

Controls whether or not child tweens/timelines are repositioned automatically (changing their startTime) in order to maintain smooth playback when properties are changed on-the-fly.

timeline : SimpleTimeline

[Read-only] Parent timeline.

vars : Object

The vars object passed into the constructor which stores configuration variables like onComplete, onUpdate, etc.

Methods

add : *

Adds a TweenLite, TweenMax, TimelineLite, or TimelineMax instance to the timeline at a specific time.

delay : *

Gets or sets the animation's initial delay which is the length of time in seconds (or frames for frames-based tweens) before the animation should begin.

duration : *

Gets or sets the animation's duration, not including any repeats or repeatDelays (which are only available in TweenMax and TimelineMax).

endTime : Number

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

eventCallback : *

Gets or sets an event callback like "onComplete", "onUpdate", "onStart", "onReverseComplete" or "onRepeat" (onRepeat only applies to TweenMax or TimelineMax instances) along with any parameters that should be passed to that callback.

invalidate : *

Clears any initialization data (like starting/ending values in tweens) which can be useful if, for example, you want to restart a tween without reverting to any previously recorded starting values.

isActive : Boolean

Indicates whether or not the animation is currently active (meaning the virtual playhead is actively moving across this instance's time span and it is not paused, nor are any of its ancestor timelines).

kill : *

Kills the animation entirely or in part depending on the parameters.

pause : *

Pauses the instance, optionally jumping to a specific time.

paused : *

Gets or sets the animation's paused state which indicates whether or not the animation is currently paused.

play : *

Begins playing forward, optionally from a specific time (by default playback begins from wherever the playhead currently is).

progress : *

Gets or sets the animations's progress which is a value between 0 and 1 indicating the position of the virtual playhead (excluding repeats) where 0 is at the beginning, 0.5 is at the halfway point, and 1 is at the end (complete).

render :

renders

restart : *

Restarts and begins playing forward from the beginning.

resume : *

Resumes playing without altering direction (forward or reversed), optionally jumping to a specific time first.

reverse : *

Reverses playback so that all aspects of the animation are oriented backwards including, for example, a tween's ease.

reversed : *

Gets or sets the animation's reversed state which indicates whether or not the animation should be played backwards.

seek : *

Jumps to a specific time without affecting whether or not the instance is paused or reversed.

startTime : *

Gets or sets the time at which the animation begins on its parent timeline (after any delay that was defined).

time : *

Gets or sets the local position of the playhead (essentially the current time), described in seconds (or frames for frames-based animations) which will never be less than 0 or greater than the animation's duration.

timeScale : *

Factor that's used to scale time in the animation where 1 = normal speed (the default), 0.5 = half speed, 2 = double speed, etc.

totalDuration : *

Gets or sets the animation's total duration including any repeats or repeatDelays (which are only available in TweenMax and TimelineMax).

totalProgress : *

Gets or sets the animation's total progress which is a value between 0 and 1 indicating the position of the virtual playhead (including repeats) where 0 is at the beginning, 0.5 is at the halfway point, and 1 is at the end (complete).

totalTime : *

Gets or sets the position of the playhead according to the totalDuration which includes any repeats and repeatDelays (only available in TweenMax and TimelineMax).

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.

Get GSAP

Version: 1.20.3 updated 2017-10-02

Core

    Extras

      Plugins

        By using GreenSock code, you agree to the terms of use.

        For an all-access pass to premium content

        Join Club GreenSock