API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classWebGpuStorageBuffer
Owning wrapper around a `GPUBuffer` allocated with `STORAGE | COPY_DST | COPY_SRC`. Designed for the data-oriented ParticleSystem GPU path: one storage buffer per SoA channel, written to from CPU each spawn frame, read by compute shaders, and (optionally) read back to CPU for expire detection. Lifetime: the caller (typically `ParticleGpuState`) owns the buffer and must call destroy when the system is torn down.
import { WebGpuStorageBuffer } from '@codexo/exojs' Owning wrapper around a `GPUBuffer` allocated with `STORAGE | COPY_DST | COPY_SRC`. Designed for the data-oriented ParticleSystem GPU path: one storage buffer per SoA channel, written to from CPU each spawn frame, read by compute shaders, and (optionally) read back to CPU for expire detection.
Lifetime: the caller (typically `ParticleGpuState`) owns the buffer and must call destroy when the system is torn down.
new(device: GPUDevice, byteLength: number, label: string): WebGpuStorageBuffer destroy(): void read(target: ArrayBufferView, encoder?: GPUCommandEncoder): Promise<void> write(data: ArrayBufferView, byteOffset: number, byteSize?: number): void buffer: GPUBuffer byteLength: number device: GPUDevice label: string