API reference

Every public class, method, and event in @codexo/exojs. Generated from source.

C

classWebGpuStorageBuffer

@codexo/exojs / rendering / stable

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.

4
props
3
methods
0
events
Import
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.

Constructors 1
new(device: GPUDevice, byteLength: number, label: string): WebGpuStorageBuffer
Methods 3
destroy(): void
read(target: ArrayBufferView, encoder?: GPUCommandEncoder): Promise<void>
write(data: ArrayBufferView, byteOffset: number, byteSize?: number): void
Properties 4
buffer: GPUBuffer
byteLength: number
device: GPUDevice
label: string
Source