glissario / bootcamp-schedule

bootcamp progress
0 stars 0 forks source link

Intro to Programming with P5: Eraser #52

Closed codingbootcampseu closed 3 years ago

codingbootcampseu commented 3 years ago

Please use the sketch from the previous task.

Hints

The mouseIsPressed variable indicates if the mouse is currently pressed.

if(mouseIsPressed) {
  // draw circle
}

The mouseX and mouseY variables hold the current mouse position on the x and y axis.

function draw() {
  console.log("MouseX is " + mouseX + " and mouseY is " + mouseY);  
}

Bonus

Use a random diameter for the circles.

circle(mouseX, mouseY, random(30));

Example Solution

glissario commented 3 years ago

done