copyVector2sArray method

BufferAttribute<NativeArray<num>> copyVector2sArray(
  1. List<Vector2> vectors
)

Implementation

BufferAttribute copyVector2sArray(List<Vector2> vectors) {
  var array = this.array;
  var offset = 0;

  for (var i = 0, l = vectors.length; i < l; i++) {
    var vector = vectors[i];
    array[offset++] = vector.x;
    array[offset++] = vector.y;
  }

  return this;
}