readCurve method

void readCurve(
  1. Map<String, dynamic> map,
  2. CurveTimeline timeline,
  3. int frameIndex
)

Implementation

void readCurve(
    Map<String, dynamic> map, CurveTimeline timeline, int frameIndex) {
  if (!map.containsKey('curve')) return;
  if (map['curve'] == 'stepped') {
    timeline.setStepped(frameIndex);
  } else if (map['curve'] is List) {
    final Float32List curve = _getFloat32List(map, 'curve')!;
    timeline.setCurve(frameIndex, curve[0], curve[1], curve[2], curve[3]);
  }
}