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 StructArrayLayout1ui2f12
Hierarchy (View Summary)
- StructArray
- StructArrayLayout1ui2f12
Constructors
constructor
-
Returns StructArrayLayout1ui2f12
Properties
arrayBuffer
arrayBuffer: ArrayBuffer
bytesPerElement
bytesPerElement: number
capacity
capacity: number
float32
float32: Float32Array
isTransferred
isTransferred: boolean
length
length: number
members
uint16
uint16: Uint16Array
uint8
uint8: Uint8Array
Methods
clear
-
Returns void
emplace
-
Parameters
- i: number
- v0: number
- v1: number
- v2: number
Returns number
emplaceBack
-
Parameters
- v0: number
- v1: number
- v2: 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.