Skip to content

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.

T extends BaseData

ArrayBuffer

T

ArrayBuffer | ArrayBufferView<ArrayBufferLike> | InferInput<T>

BufferWriteOptions

void

© Software Mansion 2026. All trademarks and copyrights belong to their respective owners. Read about our Privacy Policy.