🌆 Sets a pixel's color in the image or canvas. Color mode must be RGB.
Or if a canvas or image is provided, it's drawn on top of the destination image or canvas, ignoring its tint setting.
Run updatePixels to apply the changes.
updatePixels
Not applicable to WebGPU canvases.
color, canvas, or image
await Canvas(200);noSmooth();let c = color('lime');let img = createImage(50, 50);q5.draw = function () { img.set(random(50), random(50), c); img.updatePixels(); background(img);}; Copy
await Canvas(200);noSmooth();let c = color('lime');let img = createImage(50, 50);q5.draw = function () { img.set(random(50), random(50), c); img.updatePixels(); background(img);};
🌆 Sets a pixel's color in the image or canvas. Color mode must be RGB.
Or if a canvas or image is provided, it's drawn on top of the destination image or canvas, ignoring its tint setting.
Run
updatePixelsto apply the changes.Not applicable to WebGPU canvases.