AdvancedCreate a new Buffer Resource.
The options for the buffer resource
The underlying buffer that this resource is using
Optionaloffset?: numberThe offset of the buffer this resource is using. If not provided, then it will use the offset of the buffer.
Optionalsize?: numberThe size of the buffer this resource is using. If not provided, then it will use the size of the buffer.
the underlying buffer that this resource is using
ReadonlydestroyedHas the Buffer resource been destroyed?
Readonlyoffsetthe offset of the buffer this resource is using. If not provided, then it will use the offset of the buffer.
Readonlysizethe size of the buffer this resource is using. If not provided, then it will use the size of the buffer.
Readonlyuida unique id for this uniform group used through the renderer
A resource that can be bound to a bind group and used in a shader. Whilst a buffer can be used as a resource, this class allows you to specify an offset and size of the buffer to use. This is useful if you have a large buffer and only part of it is used in a shader.
This resource, will listen for changes on the underlying buffer and emit a itself if the buffer changes shape.
Example