xxxxxxxxxx
44
//Angelina Xu - assign5 - anti-surveillance tool - script
function setup() {
createCanvas(400, 400);
noStroke();
textAlign(CENTER);
}
function draw() {
//secret message using RGB colors to decode
fill(255);
textStyle(ITALIC);
textSize(30);
text('1415312119190', 200, 200);
//background contains the first color for "N, O, C, L, A"
fill(141, 53, 121);
rect(0, 0, 400, 400)
//revealing secret message
if (mouseIsPressed){
blendMode(LIGHTEST);
fill(191, 9, 0);
ellipse(mouseX, mouseY, 80, 80);
//secret message translated by RGB color
console.log ('NO CLASS');
}else {
blendMode(BLEND);
}
//obvious message which contains the second color for "S, S"
fill(191, 9, 0);
textStyle(BOLD);
textSize(80);
text('WE', 80, 220);
text('WANT', 280, 220);
}