int gSize = 50; PImage mac; PImage mac2; PFont f; float rand = 0; int value = 0; void setup() { size(800, 800); background(0); noStroke(); mac = loadImage("mac copy.jpeg"); mac2 = loadImage("Mac_Miller_2017.jpg"); // printArray(PFont.list()); f = createFont("Impact", 78); textFont(f); } void draw() { if (!mousePressed) { noTint(); image(mac, 0, 0, width/2, height/2); image(mac2, width/2, height/2, width/2, height/2); } else { int checkCounter = 0; for ( int i = 0; i < height; i+= gSize) { checkCounter++; for ( int j = 0; j < width; j+=(gSize) ) { if ( (checkCounter % 2) == 0 ) { image(mac2, j, i, gSize, gSize); } else { tint(255, 40); image(mac, j, i, gSize, gSize); } checkCounter++; } } } zmSign1("MAC", 450 , 50); zmSign2("miller",50,450); textAlign(CENTER); zmSign3("RIP", mouseX,400); zmSign4("RIP", mouseX,400); textAlign(LEFT); fill(value); rect(180,165,100,15); //saveFrame("ZMex2-#####.png"); } void keyPressed() { if ( key == 'm' || key == 'M' ) { // example of toggle logic if (value == 0) { value = 255; } else { value = 0; } } } void zmSign1(String ss , int locx, int loy) { fill(120,50); rect(locx,loy,300,300); fill(34); rect(locx-10,loy-10,300,300); color k = color(0,255,0); zmDrawText(ss,locx+20,loy+50,k); zmRanGrcs(locx,loy,color(200,255,0,30)); } void zmSign2(String ss,int locx, int loy) { fill(20,50); rect(locx,loy,300,300); fill(100); rect(locx-10,loy-10,300,300); color k = color(255,0,0); zmDrawText(ss,locx+20,loy+50,k); zmRanGrcs(locx+300,loy,color(255,0,0,30)); } void zmDrawText(String s, int lx, int ly, color c ) { fill(c); text(s, lx, ly,20); } void zmRanGrcs(int lx, int ly, color c) { fill(mouseY/3, mouseX/3, mouseY/3); float r = random(75); for (int i= 0; i < 30; i++) { ellipse(random(width), random(height),400%r,400%r); } } void zmSign3(String ss,int locx, int loy) { color k = color(mouseX,mouseY,mouseX); zmDrawText(ss,mouseX*-1+800,loy-100,k); zmRanGrcs(locx+300,loy,color(255,0,0,30)); } void zmSign4(String ss,int locx, int loy) { color k = color(mouseX,mouseY,mouseX); zmDrawText(ss,mouseX,loy+300,k); zmRanGrcs(locx+300,loy,color(255,0,0,30)); }