Used as a wrapper around GPUBuffer.

Useful to keep tracks of all the GPUBuffer created thanks to the uuid property.

Constructors

Properties

type: string

The type of the Buffer

uuid: string

The universal unique id of the Buffer

options: GPUBufferDescriptor

Options used to create this Buffer, also used as GPUBufferDescriptor

GPUBuffer: GPUBuffer

The actual GPUBuffer after having been created.

consumers: Set<string>

A Set to store this Buffer consumers (usually Geometry uuid or BindGroup uuid)

Accessors

Methods

  • Set the GPUBuffer. This allows to use a Buffer with a GPUBuffer created separately.

    Parameters

    • GPUBuffer: GPUBuffer

      GPU buffer to use.

    Returns void