applyInterpolation method

  1. @override
void applyInterpolation (
  1. ActorComponent component,
  2. double time,
  3. KeyFrame toFrame,
  4. double mix
)
override

Implementation

@override
void applyInterpolation(
    ActorComponent component, double time, KeyFrame toFrame, double mix) {
  KeyFrameNumeric to = toFrame as KeyFrameNumeric;
  double f = (time - _time) / (to._time - _time);
  if (_interpolator != null) {
    f = _interpolator.getEasedMix(f);
  }
  setValue(component, _value * (1.0 - f) + to._value * f, mix);
}