xxxxxxxxxx
// FOUR FOUNDATIONAL CONCEPTS
// Variables
// Loops
// Functions -> Paragraphs
// Conditional Statements -> Questions
// -----------
// mouseX, mouseY
// keyIsPressed
// key
// mouseIsPressed
// keyCode
//
// Random(
// Errors
// Console
function setup() {
createCanvas(400, 400);
}
function draw() {
background(100);
fill(255); // default color
if(keyIsPressed) {
fill(68,188,216);
stroke(224,123,57);
}
if(mouseIsPressed){
fill(10);
}
if(keyCode == UP_ARROW){
fill( 50, 168, 82);
}
if(key == '1') {
fill(234, 221, 202);
}
if(key == '2')
fill(193, 154, 107);
triangle(100, 200, 200, 100, 300, 200)
} // end draw