getAnimationsWithTimings method

List<Tuple3<Animation, double, double>> getAnimationsWithTimings()

Implementation

List<Tuple3<Animation, double, double>> getAnimationsWithTimings() {
  var animationWithTimings = <Tuple3<Animation, double, double>>[];
  var currentTime = 0.0;

  for (var anim in animations) {
    var startTime = currentTime;
    var endTime = startTime + anim.runTime;
    animationWithTimings.add(Tuple3(anim, startTime, endTime));

    currentTime = interpolateValue(startTime, endTime, lagRatio);
  }

  return animationWithTimings;
}