xxxxxxxxxx
47
function setup() {
createCanvas(400, 400);
}
function draw() {
background(220);
//Line 1
strokeWeight(1)
stroke(0)
line(25,20,155,70)
//Rect 1
strokeWeight(1)
stroke(0)
fill(255)
rect(200,50,175,55)
//Rect 2
strokeWeight(1)
stroke(0)
fill(255)
rect(50,200,80,80)
//Triangle 1
strokeWeight(1)
stroke(0)
fill(255)
triangle(200,300,250,200,310,350)
//CODE ALONG: Change the strokeWeight of the line if the mouse is touching it, and change it back to normal if the mouse is not.
//YOUR TASK:
//Choose something to change about Rect 1 if the mouse is touching it, and change it back when the mouse is not. (It can be fill color, stroke color, strokeWeight, size, etc. Your choice!)
////Choose something to change about Rect 2 if the mouse is touching it, and change it back when the mouse is not. (It can be fill color, stroke color, strokeWeight, size, etc. Your choice!)
//Choose something to change about Triangle 1 if the mouse is touching it, and change it back when the mouse is not. (It can be fill color, stroke color, strokeWeight, size, etc. Your choice!)
}