🌆 Applies changes in the pixels array to the canvas or image.
pixels
Not applicable to WebGPU canvases.
await Canvas(200);let c = color('pink');let img = createImage(50, 50);for (let x = 0; x < 50; x += 3) { for (let y = 0; y < 50; y += 3) { img.set(x, y, c); }}img.updatePixels();background(img); Copy
await Canvas(200);let c = color('pink');let img = createImage(50, 50);for (let x = 0; x < 50; x += 3) { for (let y = 0; y < 50; y += 3) { img.set(x, y, c); }}img.updatePixels();background(img);
🌆 Applies changes in the
pixelsarray to the canvas or image.Not applicable to WebGPU canvases.