Advanced
Create a new instance eof the Bind Group.
Optional
resources: Record<string, BindResource>The resources that are bound together for use by a shader.
Destroys this bind group and removes all listeners.
Returns the resource at the current specified index.
The index of the resource to get.
Set a resource at a given index. this function will ensure that listeners will be removed from the current resource and added to the new resource.
The resource to set.
The index to set the resource at.
A bind group is a collection of resources that are bound together for use by a shader. They are essentially a wrapper for the WebGPU BindGroup class. But with the added bonus that WebGL can also work with them.
See
https://gpuweb.github.io/gpuweb/#dictdef-gpubindgroupdescriptor
Example