// Week 4: Interactive Stevie // Draws an interactive drawing of my cat. eye color changes based on mouse //position, and scarf color changes randomly with each mouse click. // Author: Brett Silvers // Class: PUDT 1203 Creative Computing PImage img; PImage img2; PImage img3; PImage img4; PImage img5; // void setup() { size(960, 563); background(255); noStroke(); img = loadImage("5eyes.gif"); img2 = loadImage("7scarf.gif"); img3 = loadImage("2rug.gif"); img4 = loadImage("4stevie.gif"); img5 = loadImage("6outline.gif"); tint( random(100, 200), random(100, 200), random(100, 200)); image(img3, 0, 0); noTint(); image(img4, 0, 0); } // float value = random (0, 255); // void draw() { tint (map(mouseX, 0, 960, 0, 583), map(mouseX, 0, 960, 0, 583), random (0, 25)); image(img, 0, 0); noTint(); image(img5, 0, 0); tint (value, value-100, 0); image(img2, 0, 0); } void mouseClicked() { if (value == 0) { value = random (50, 200); } else { value = random (50, 200); } }