xxxxxxxxxx
24
/*
Simple Drawing Canvas for the
Piper Command Center
*/
function setup() {
createCanvas(640, 480);
currentStrokeWeightsIndex = 0;
currentColorIndex = 0;
clearDrawing();
}
function draw() {
// Draw
// Only call clear() if the 'a', aka LeftButton is pressed
if ((isKeyPressed == true) && (key == 'a')) {
clearDrawing();
}
line(mouseX, mouseY, pmouseX, pmouseY);
}
function clearDrawing() {
background(152);
}