xxxxxxxxxx
36
let size = 150
function setup() {
createCanvas(400, 400);
background(200);
}
function draw() {
//these lines will make a red square with a blue outline
rectMode(CENTER);
fill(255, 0, 0);
stroke(0, 0, 255);
strokeWeight(4);
rect(width/2, height/2, size, size);
//these lines will make a green circle with no outline and a little bit transparent
noStroke();
fill(0, 255, 0, 95);
ellipse(width/2-size/2, height/2, size);
/*
if(mouseIsPressed){
background(200);
}
if (mouseX > width/2){
fill(0);
ellipse(mouseX, mouseY, size);
}
*/
//these lines will make the pink text
//fill(255, 0, 255);
//text("a square and a circle", 140, 100);
}