xxxxxxxxxx
29
let R;
let G;
let B;
let circleX = 100;
let circleY = 100;
function setup() {
createCanvas(700, 600);
}
function draw() {
console.log(mouseX, mouseY);
//background(220);
//fill with a color
fill(R, G, B);
//draw a cricle at the mouseX,mouseY position
ellipse(mouseX, mouseY, 50, 50);
noStroke();
}
function mousePressed() {
//happens when we click the mouse
//choose a different color
R = random(255);
G = random(255);
B = random(255);
}