xxxxxxxxxx
35
function setup() {
createCanvas(900, 600);
background(220, 170, 145)
print(width, height);
}
function draw() {
if (mouseIsPressed && mouseX <= width/2) {
fill(0, 70, 120);
} else if (mouseIsPressed){
noFill();
strokeWeight(3);
stroke(200,200,2);
rect(mouseX,mouseY,100,100);
} else {
fill('green');
}
noStroke();
//mouse x and y let the object stalk your mouse's movements
ellipse (mouseX, mouseY, 20, 50)
}
// function mousePressed () {
// //need to learn how to change color of brush/object every time mouse is clicked
// background(220, 170, 145)
// fill(70, 50, 80);
// noStroke();
// ellipse (mouseX, mouseY, 20, 50)
// }