void setup() { size(650, 650); background(0); } void draw() { PImage img; img = loadImage("rt.JPG"); image(img, 25, 25, 600, 600); PImage img2; img = loadImage("DSC03870 3.JPG"); image(img, 425, 25, 200, 600); PImage img3; img = loadImage("DSC03336 2.JPG"); image(img, 25, 25, 200, 600); //first image //box to reveal artwork float mapcolor = map(mouseX, 0 , 600, 0, 193); fill (0); rect(25, 25, mapcolor, 600); // second image // circles on the sequins noStroke(); fill(random(0,255), random(0,255), random(0,255)); ellipse(269,198,10,10); noStroke(); fill(random(0,255), random(0,255), random(0,255)); ellipse(310,290,10,10); noStroke(); fill(random(0,255), random(0,255), random(0,255)); ellipse(348,212,10,10); noStroke(); fill(random(0,255), random(0,255), random(0,255)); ellipse(280,245,10,10); noStroke(); fill(random(0,255), random(0,255), random(0,255)); ellipse(355,260,10,10); //interactive sequins fill(246, 232, 11); ellipse(310 + random(-10, 10), 290 + random(-10, 10), 10, 10); fill(246, 232, 11); ellipse(269 + random(-10, 10), 198 + random(-10, 10), 10, 10); fill(246, 232, 11); ellipse(348 + random(-10, 10), 212 + random(-10, 10), 10, 10); fill(246, 232, 11); ellipse(280 + random(-10, 10), 245 + random(-10, 10), 10, 10); fill(246, 232, 11); ellipse(355 + random(-10, 10), 260 + random(-10, 10), 10, 10); //third image float mapcolor2 = map(mouseX, 0 , 600, 0, 193); fill (0); rect(425, 0, mapcolor2, 625); // border loops if (mousePressed) { fill(237, 129, 49); noStroke(); } else { fill(244, 142, 10, 90); noStroke(); } ellipse(mouseX + random(-30, 30), mouseY + random(-30, 30), 10, 10); }