copyVector4sArray method

BufferAttribute<NativeArray<num>> copyVector4sArray(
  1. List<Vector4> vectors
)

Copy the Vector4 array given here into array.

Implementation

BufferAttribute copyVector4sArray(List<Vector4> vectors) {
  final array = this.array;
  int offset = 0;

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

  return this;
}