copyAt method

BufferAttribute<NativeArray<num>> copyAt(
  1. int index1,
  2. BufferAttribute<NativeArray<num>> attribute,
  3. int index2
)

Copy a vector from bufferAttributeindex2 to arrayindex1.

Implementation

BufferAttribute copyAt(int index1, BufferAttribute attribute, int index2) {
  index1 *= itemSize;
  index2 *= attribute.itemSize;

  for (int i = 0, l = itemSize; i < l; i++) {
    array[index1 + i] = attribute.array[index2 + i];
  }

  return this;
}