generateIndices method

  1. @override
void generateIndices (Uint16List indices)
override

Implementation

@override
void generateIndices(Uint16List indices) {
  int index = 0;
  final int length = _segments * 2;
  for (int i = 0; i < length; i += 2) {
    indices[index + 0] = i + 0;
    indices[index + 1] = i + 1;
    indices[index + 2] = i + 3;
    indices[index + 3] = i + 0;
    indices[index + 4] = i + 3;
    indices[index + 5] = i + 2;
    index += 6;
  }
  assert(index == indexCount);
}