writeToArrayBuffer
writeToArrayBuffer<
T>(buffer,schema,data,options?):void
Defined in: packages/typegpu/src/data/dataIO.ts:839
A function for filling in buffers with data based on TypeGPU schemas. When schema instances or JS arrays are passed, the padding is applied automatically. ArrayBuffers are expected to be already padded.
Type Parameters
Section titled “Type Parameters”T extends BaseData
Parameters
Section titled “Parameters”buffer
Section titled “buffer”ArrayBuffer
schema
Section titled “schema”T
ArrayBuffer | ArrayBufferView<ArrayBufferLike> | InferInput<T>
options?
Section titled “options?”Returns
Section titled “Returns”void
© Software Mansion 2026. All trademarks and copyrights belong to their respective owners. Read about our Privacy Policy.