function setup() { createCanvas(400, 400); background(220); } function draw() { // Nothing to draw continuously in this example } function mousePressed() { fill(random(255), random(255), random(255)); // Random fill color noStroke(); // No stroke for shapes ellipse(mouseX, mouseY, 20, 20); // Draw ellipse at mouse position }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter