Using Shapes With the Mouse
Draw a shape with P5.js and move it with the mouse
Draw a shape with P5.js and move it with the mouse
Use this code to add your name
textSize(32);
text('Your Name', 10, 30);
function setup() {
createCanvas(640, 480);
}
function draw() {
if (mouseIsPressed) {
fill(0);
} else {
fill(255);
}
ellipse(mouseX, mouseY, 80, 80);
}