Uniform

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

Constructors

new Uniform(options: UniformOptions): Uniform

Properties

binding

binding: number

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.