Initializes a new dynamic array buffer.
The type of elements this buffer will store primarily.
ReadonlybyteThe number of bytes per element based on the ArrayType.
Optionalfloat32Float32Array view of the underlying memory buffer.
ProtectedmaxThe maximum number of elements the buffer can currently hold without resizing.
The main typed array view corresponding to the specified ArrayType.
Optionaluint16Uint16Array view of the underlying memory buffer.
Optionaluint32Uint32Array view of the underlying memory buffer.
The number of elements currently used in the buffer.
The number of elements currently stored in the buffer.
Resets the element usage count to zero. The underlying memory capacity is preserved.
Gets the value of the element at the specified index.
The index of the element to retrieve.
The requested element.
Returns a constrained view of the primary typed array up to the specified range.
If end is omitted, returns the whole reallocated buffer slice.
The starting index (inclusive). Defaults to 0.
Optionalend: numberThe ending index (exclusive). Optional.
A subarray corresponding to the specified range.
Returns the typed array constructor for the corresponding ArrayType.
The type of the array.
The typed array constructor.
Removes and returns the last element in the buffer.
The removed element or undefined if the buffer is empty.
Appends an element to the buffer, using the primary typed array view.
The item to add.
Appends a new 32-bit floating point element to the buffer.
The item to add.
Appends a new 32-bit unsigned integer element to the buffer.
The item to add.
Resets the buffer's used element count, effectively emptying it.
Same behavior as clear.
Checks if the buffer has enough space for additional elements and resizes the buffer if necessary.
The number of new elements that need to be accommodated.
true if the buffer was resized, false otherwise.
ProtectedsetReallocates the underlying array buffer to a new size and copies existing data.
The new maximum number of elements.
Returns the last element pushed to the buffer without removing it.
The last element.
Updates the typed array views when the internal array buffer gets reallocated.
A dynamic array buffer that can grow in size automatically when elements are added. It allocates an ArrayBuffer and provides typed array views to manipulate the data.