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 StructArrayLayout1ul4
Hierarchy (View Summary)
- StructArray
- StructArrayLayout1ul4
Constructors
constructor
-
Returns StructArrayLayout1ul4
Properties
arrayBuffer
arrayBuffer: ArrayBuffer
bytesPerElement
bytesPerElement: number
capacity
capacity: number
isTransferred
isTransferred: boolean
length
length: number
members
uint32
uint32: Uint32Array
uint8
uint8: Uint8Array
Methods
clear
-
Returns void
emplace
-
Parameters
- i: number
- v0: number
Returns number
emplaceBack
-
Parameters
- v0: number
Returns number
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.