xxxxxxxxxx
function preload() {
mustache= loadImage("border 5.png");
}
function setup() {
createCanvas(650, 500);
webcam = createCapture(VIDEO, { flipped: true });
webcam.hide();
color = random(255);
} //End of Setup Function
function draw() {
background(220);
imageMode(CENTER);
image(webcam, 325, 250, 650, 500);
//Filter #1
if (key == "1") {
tint(240, 240, 245)
filter(GRAY);
image(mustache, 265, 300, 250, 189)
} //End of If Statement (Filter #1)
//Filter #2
if (key == "2") {
tint(620);
filter(POSTERIZE);
}
//Filter #3
if (key == "3") {
tint(15,5,color);
filter(DILATE);
}
}