const output = device.createBuffer({
size: BUFFER_SIZE,
usage: GPUBufferUsage.STORAGE | GPUBufferUsage.COPY_SRC,
});
output.label = "my_buffer";
console.log(output.label); // "my_buffer"GPUBuffer: label property / notebook
GPUBuffer: label property
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
const output = device.createBuffer({
size: BUFFER_SIZE,
usage: GPUBufferUsage.STORAGE | GPUBufferUsage.COPY_SRC,
label: "my_buffer",
});
console.log(output.label); // "my_buffer"