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.
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.
falseif the global timeline is paused. Returns
trueif the global timeline is playing.
falseif the global timeline is not active. Returns
trueif the global timeline is active.
gsap.globalTimeline.timeScale()- Gets or sets the global
timeScalewhich 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:
gsap.globalTimeline.timeScale(0.5); //plays at half-speed
gsap.globalTimeline.timeScale(2); //plays twice the normal speed
var currentTimeScale = gsap.globalTimeline.timeScale(); //returns the current global timeScale