Closed codingbootcampseu closed 3 years ago
Please use the sketch from the previous task.
draw
Hints
The mouseIsPressed variable indicates if the mouse is currently pressed.
mouseIsPressed
if(mouseIsPressed) { // draw circle }
The mouseX and mouseY variables hold the current mouse position on the x and y axis.
mouseX
mouseY
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
Windows Logo zerschossen :) Gott sei Dank musste ich nicht von Apple einen Stück beissen
Please use the sketch from the previous task.
draw
functionHints
The
mouseIsPressed
variable indicates if the mouse is currently pressed.The
mouseX
andmouseY
variables hold the current mouse position on the x and y axis.Bonus
Use a random diameter for the circles.
Example Solution