Updated dependencies.
This commit is contained in:
+32
-33
@@ -1,6 +1,6 @@
|
||||
/*!
|
||||
* VERSION: 2.1.0
|
||||
* DATE: 2019-02-15
|
||||
* VERSION: 2.1.3
|
||||
* DATE: 2019-05-17
|
||||
* UPDATES AND DOCS AT: http://greensock.com
|
||||
*
|
||||
* @license Copyright (c) 2008-2019, GreenSock. All rights reserved.
|
||||
@@ -70,16 +70,16 @@ _gsScope._gsDefine("TimelineLite", ["core.Animation","core.SimpleTimeline","Twee
|
||||
_defaultImmediateRender = function(tl, toVars, fromVars, defaultFalse) { //default to immediateRender:true unless otherwise set in toVars, fromVars or if defaultFalse is passed in as true
|
||||
var ir = "immediateRender";
|
||||
if (!(ir in toVars)) {
|
||||
toVars[ir] = !(tl._paused || (fromVars && fromVars[ir] === false) || defaultFalse);
|
||||
toVars[ir] = !((fromVars && fromVars[ir] === false) || defaultFalse);
|
||||
}
|
||||
return toVars;
|
||||
},
|
||||
//for distributing values across an array. Can accept a number, a function or (most commonly) a function which can contain the following properties: {base, amount, from, ease, grid, axis, length}. Returns a function that expects the following parameters: index, target, array. Recognizes the following
|
||||
//for distributing values across an array. Can accept a number, a function or (most commonly) a function which can contain the following properties: {base, amount, from, ease, grid, axis, length, each}. Returns a function that expects the following parameters: index, target, array. Recognizes the following
|
||||
_distribute = function(v) {
|
||||
if (typeof(v) === "function") {
|
||||
return v;
|
||||
}
|
||||
var vars = isNaN(v) ? v : {n:1, from:(v < 0) ? ((v = -v) && "end") : 0}, //n:1 is just to indicate v was a number; we leverage that later to set v according to the length we get. If a number is passed in, we treat it like the old stagger value where 0.1, for example, would mean that things would be distributed with 0.1 between each element in the array rather than a total "amount" that's chunked out among them all.
|
||||
var vars = (typeof(v) === "object") ? v : {each:v}, //n:1 is just to indicate v was a number; we leverage that later to set v according to the length we get. If a number is passed in, we treat it like the old stagger value where 0.1, for example, would mean that things would be distributed with 0.1 between each element in the array rather than a total "amount" that's chunked out among them all.
|
||||
ease = vars.ease,
|
||||
from = vars.from || 0,
|
||||
base = vars.base || 0,
|
||||
@@ -116,15 +116,16 @@ _gsScope._gsDefine("TimelineLite", ["core.Animation","core.SimpleTimeline","Twee
|
||||
}
|
||||
distances.max = max - min;
|
||||
distances.min = min;
|
||||
distances.v = vars.n ? l * (v || 0) : vars.amount;
|
||||
distances.v = l = vars.amount || (vars.each * (wrap > l ? l - 1 : !axis ? Math.max(wrap, l / wrap) : axis === "y" ? l / wrap : wrap)) || 0;
|
||||
distances.b = (l < 0) ? base - l : base;
|
||||
}
|
||||
l = (distances[i] - distances.min) / distances.max;
|
||||
return base + (ease ? ease.getRatio(l) : l) * distances.v;
|
||||
return distances.b + (ease ? ease.getRatio(l) : l) * distances.v;
|
||||
};
|
||||
},
|
||||
p = TimelineLite.prototype = new SimpleTimeline();
|
||||
|
||||
TimelineLite.version = "2.1.0";
|
||||
TimelineLite.version = "2.1.3";
|
||||
TimelineLite.distribute = _distribute;
|
||||
p.constructor = TimelineLite;
|
||||
p.kill()._gc = p._forcingPlayhead = p._hasPause = false;
|
||||
@@ -441,6 +442,29 @@ _gsScope._gsDefine("TimelineLite", ["core.Animation","core.SimpleTimeline","Twee
|
||||
if (prevTime !== self._time) { //if totalDuration() finds a child with a negative startTime and smoothChildTiming is true, things get shifted around internally so we need to adjust the time accordingly. For example, if a tween starts at -30 we must shift EVERYTHING forward 30 seconds and move this timeline's startTime backward by 30 seconds so that things align with the playhead (no jump).
|
||||
time += self._time - prevTime;
|
||||
}
|
||||
if (self._hasPause && !self._forcingPlayhead && !suppressEvents) {
|
||||
if (time > prevTime) {
|
||||
tween = self._first;
|
||||
while (tween && tween._startTime <= time && !pauseTween) {
|
||||
if (!tween._duration) if (tween.data === "isPause" && !tween.ratio && !(tween._startTime === 0 && self._rawPrevTime === 0)) {
|
||||
pauseTween = tween;
|
||||
}
|
||||
tween = tween._next;
|
||||
}
|
||||
} else {
|
||||
tween = self._last;
|
||||
while (tween && tween._startTime >= time && !pauseTween) {
|
||||
if (!tween._duration) if (tween.data === "isPause" && tween._rawPrevTime > 0) {
|
||||
pauseTween = tween;
|
||||
}
|
||||
tween = tween._prev;
|
||||
}
|
||||
}
|
||||
if (pauseTween) {
|
||||
self._time = self._totalTime = time = pauseTween._startTime;
|
||||
pauseTime = self._startTime + (self._reversed ? self._duration - time : time) / self._timeScale;
|
||||
}
|
||||
}
|
||||
if (time >= totalDur - _tinyNum && time >= 0) { //to work around occasional floating point math artifacts.
|
||||
self._totalTime = self._time = totalDur;
|
||||
if (!self._reversed) if (!self._hasPausedChild()) {
|
||||
@@ -493,31 +517,6 @@ _gsScope._gsDefine("TimelineLite", ["core.Animation","core.SimpleTimeline","Twee
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
if (self._hasPause && !self._forcingPlayhead && !suppressEvents) {
|
||||
if (time >= prevTime) {
|
||||
tween = self._first;
|
||||
while (tween && tween._startTime <= time && !pauseTween) {
|
||||
if (!tween._duration) if (tween.data === "isPause" && !tween.ratio && !(tween._startTime === 0 && self._rawPrevTime === 0)) {
|
||||
pauseTween = tween;
|
||||
}
|
||||
tween = tween._next;
|
||||
}
|
||||
} else {
|
||||
tween = self._last;
|
||||
while (tween && tween._startTime >= time && !pauseTween) {
|
||||
if (!tween._duration) if (tween.data === "isPause" && tween._rawPrevTime > 0) {
|
||||
pauseTween = tween;
|
||||
}
|
||||
tween = tween._prev;
|
||||
}
|
||||
}
|
||||
if (pauseTween) {
|
||||
self._time = self._totalTime = time = pauseTween._startTime;
|
||||
pauseTime = self._startTime + (time / self._timeScale);
|
||||
}
|
||||
}
|
||||
|
||||
self._totalTime = self._time = self._rawPrevTime = time;
|
||||
}
|
||||
if ((self._time === prevTime || !self._first) && !force && !internalForce && !pauseTween) {
|
||||
|
||||
Reference in New Issue
Block a user