lendControlInterpolant method

Interpolant lendControlInterpolant()

Implementation

Interpolant lendControlInterpolant() {
  final interpolants = _controlInterpolants,
      lastActiveIndex = _nActiveControlInterpolants++;

  Interpolant? interpolant = interpolants.length < lastActiveIndex?interpolants[lastActiveIndex]:null;

  if (interpolant == null) {
    console.info(" AnimationMixer LinearInterpolant init todo");
    interpolant = LinearInterpolant(List<num>.filled(2, 0),
        List<num>.filled(2, 0), 1, _controlInterpolantsResultBuffer);

    interpolant.cachedIndex = lastActiveIndex;
    interpolants.listSetter(lastActiveIndex,interpolant);
  }

  return interpolant;
}