WHERE’S WALDO ANIMATION
CODE:
PImage photo; int y = 0; void waldoTxt(){ fill(255); rect(30,33.5,200,20); fill(0); strokeWeight(50); textSize(20); text("Where's Waldo?",50,50); } void randomColor(){ float r = random(255); float g = random(255); float b = random(255); fill(r,g,b); } void arrow(){ beginShape(); vertex(667,85); vertex(697,127); vertex(708,116); vertex(701,141); vertex(672,138); vertex(687,129); vertex(642,95); endShape(); } void foundWaldo(){ float txtX = 100; float txtY = 300; fill(255); rect(80,200,600,150); textSize(100); randomColor(); text("F",txtX,txtY); randomColor(); text("0",txtX+60,txtY); randomColor(); text("U",txtX+120,txtY); randomColor(); text("N",txtX+180,txtY); randomColor(); text("D",txtX+240,txtY); randomColor(); text("H",txtX+360,txtY); randomColor(); text("I",txtX+420,txtY); randomColor(); text("M",txtX+460,txtY); randomColor(); text("!",txtX+530,txtY); randomColor(); arrow(); delay(300); } void setup(){ size(845,600); background(255); photo = loadImage("Wheres waldo.jpg"); } void draw() { strokeWeight(5); stroke(0); background(255); noFill(); image(photo, 0, 0); circle(mouseX,mouseY,40); println(mouseX,mouseY); // circle(716,176,20); waldoTxt(); if (mouseX>696 & mouseX<736 & mouseY>156 & mouseY<196){ foundWaldo(); } }
Notes
Additional Homework Documentation
F
Leave a Reply