xxxxxxxxxx
15
function setup() { // this function only runs once
createCanvas(400, 400);
strokeWeight(9);
stroke(01, 67, 189);
}
function draw() {
background(0);
// If the 'A' key is pressed, draw a line
if ((keyIsPressed == true) && (key == 'A')) {
line(50, 25, 50, 75);
}
else { // Otherwise, draw an ellipse
ellipse(100, 100, 50, 50);
}
}