Storage

A GPU storage object that can be used in a BindGroup.

Constructors

new Storage(options: StorageOptions): Storage

Properties

binding

binding: number

bufferOptions

bufferOptions: {
type: "storage" | "read-only-storage";
}

canvas

canvas: HTMLCanvasElement

canvasFormat

canvasFormat: GPUTextureFormat

context

cpuBuffer

cpuBuffer: ArrayType

gpuBuffer

gpuBuffer: GPUBuffer

label

label: string

usage

usage: number

visibility

visibility: number

Methods

getDevice

getDevice(): Promise<GPUDevice>

setCanvas

setCanvas(canvas: HTMLCanvasElement): void

setCpuBuffer

setCpuBuffer(buffer: ArrayType): Promise<void>

setDevice

setDevice(d: GPUDevice): void

setLabel

setLabel(label: string): void

updateGpuBuffer

updateGpuBuffer(): Promise<void>

You are viewing the beta docs. You may find the legacy docs more helpful.