The underlying TypedArray type.
The length in bytes of the array.
Returns the number of vectors in this array.
Clones this array.
Performs the specified action for each element in an array.
Note that mutating the callback value will not mutate the underlying array. To mutate the underlying array, use the index provided as second argument, then mutate the array with a mutating method, such as setVector:
const array = new Vector3Array(...);
// Add one to each Y value of the array
array.forEach((v, index) => {
// This has no effect on the Vector3Array:
v.setY(v.y + 1);
// Use this pattern instead:
array.setVector(index, new Vector3(v.x, v.y + 1, v.z));
// Or this one
array.setY(index, v.y + 1);
})
Pushes a vector at the end of the array, allocating memory if necessary.
Sets the vector at the specified index.
A typed array of three.js Vector2s.