Jump to content
GreenSock

Details

gsap.globalTimeline is the timeline that all other GSAP tweens and timelines make use of under the hood. Thus manipulating gsap.globalTimeline can be very powerful if you're wanting to affect all other tweens and timelines at once.

Methods

  • gsap.globalTimeline.pause() - Pauses the global timeline which affects ALL animations. Returns itself.
  • gsap.globalTimeline.play() - Resumes the global timeline which affects ALL animations. Returns itself.
  • gsap.globalTimeline.paused() - Returns false if the global timeline is paused. Returns true if the global timeline is playing.
  • gsap.globalTimeline.isActive() - Returns false if the global timeline is not active. Returns true if the global timeline is active.
  • gsap.globalTimeline.timeScale() - Gets or sets the global timeScale which is a multiplier that affects ALL animations equally. This doesn’t actually set the timeScale() of each individual tween/timeline, but rather it affects the rate at which the root timeline plays (that timeline contains all other animations). This is a great way to globally speed up or slow down all animations at once. For example:

    1. gsap.globalTimeline.timeScale(0.5); //plays at half-speed
    2. gsap.globalTimeline.timeScale(2); //plays twice the normal speed
    3. var currentTimeScale = gsap.globalTimeline.timeScale(); //returns the current global timeScale
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.
×