For AI agents: a documentation index is available at /llms.txt. Markdown versions of all pages are available by appending .md to any URL.
Class StructArrayLayout6i1ul2ui20
Hierarchy (View Summary)
- StructArray
- StructArrayLayout6i1ul2ui20
Constructors
constructor
-
Returns StructArrayLayout6i1ul2ui20
Properties
arrayBuffer
arrayBuffer: ArrayBuffer
bytesPerElement
bytesPerElement: number
capacity
capacity: number
int16
int16: Int16Array
isTransferred
isTransferred: boolean
length
length: number
members
uint16
uint16: Uint16Array
uint32
uint32: Uint32Array
uint8
uint8: Uint8Array
Methods
clear
-
Returns void
emplace
emplaceBack
freeBufferAfterUpload
-
Replace the buffer with an empty one so typed views release the original ArrayBuffer for GC.
Returns void
reserve
-
Indicate a planned increase in size, so that any necessary allocation may be done once, ahead of time.
Parameters
- n: number
The expected size of the array.
Returns void
- n: number
resize
-
Resize the array. If
nis greater than the current length then additional elements with undefined values are added. Ifnis less than the current length then the array will be reduced to the firstnelements.Parameters
- n: number
The new size of the array.
Returns void
- n: number
Staticdeserialize
-
Parameters
- input: SerializedStructArray
Returns any
Staticserialize
-
Serialize a StructArray instance. Serializes both the raw data and the metadata needed to reconstruct the StructArray base class during deserialization.
Parameters
- array: StructArray
Optionaltransferables: Transferable[]
Returns SerializedStructArray
Resets the length of the array to 0 without de-allocating capacity.