MCPcopy
hub / github.com/greensock/GSAP / _getClippedDuration

Function _getClippedDuration

src/GSDevTools.js:81–93  ·  view source on GitHub ↗
(animation, excludeRootRepeats)

Source from the content-addressed store, hash-verified

79 return a;
80 },
81 _getClippedDuration = (animation, excludeRootRepeats) => {
82 let max = 0,
83 repeat = Math.max(0, animation._repeat),
84 t = animation._first;
85 if (!t) {
86 max = animation.duration();
87 }
88 while (t) {
89 max = Math.max(max, t.totalDuration() > 999 ? t.endTime(false) : t._start + t._tDur / t._ts);
90 t = t._next;
91 }
92 return (!excludeRootRepeats && repeat) ? max * (repeat + 1) + (animation._rDelay * repeat) : max;
93 },
94 _globalizeTime = function(animation, rawTime) {
95 let a = animation,
96 time = arguments.length > 1 ? +rawTime : a.rawTime();

Callers 2

animationFunction · 0.70
updateRootDurationFunction · 0.70

Calls 3

durationMethod · 0.80
endTimeMethod · 0.80
totalDurationMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…