xxxxxxxxxx
36
function setup() {
createCanvas(600, 120);
}
function draw() {
//set the background to a light gray
background(204);
//TRIANGLE
fill(0); //set the fill color to a middle gray
noStroke(0); //set the stroke color to black
triangle(65, 88, 74, 38, 115, 71);
//rect
fill(130); //set the fill color to a middle gray
stroke(255); //set the stroke color to white
strokeWeight(5); //set the stroke weight to 5
rect(150, 10, 50, 100)
//Ellipse
fill(20); //set the fill color to a dark gray
stroke(255); //set the stroke color to white
strokeWeight(2); //set the stroke weight
ellipse(300, 50, 50, 60)
//To help you find the right point positions, use this line:
fill(0); //set the fill color to black
noStroke(); //set the stroke to none
text(mouseX + ", " + mouseY, 20, 20);
//We will explain how it works later on.
}