Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Fight Club
- //"Soap and human sacrifice go hand in hand."
- //Amy Pinilla
- //February 12th, 2018
- color reddish = color (185, 26, 26);
- color pinkish = color (227, 50, 103);
- color silver = color (192, 192, 192);
- color bubble = color (136, 159, 203, 150);
- color magenta = color (214, 26, 104);
- boolean theKey = false;
- float z= 40;
- float a=576;
- float b=357;
- int soapColor=2;
- float stroke = 0;
- void setup () {
- println ("'Soap and human sacrifice go hand in hand.'");
- println ("Press the mouse and clear the static.");
- println ("Press any key. Change the color of the soap dish. Ruin this drawing.");
- println ( "Reach self destruction.");
- size (800, 800) ;
- stroke(255, 0, 0);
- frameRate(5);
- }
- void draw () {
- if (mousePressed) {
- stroke = stroke +10;
- } else {
- stroke = stroke+1;
- }
- //clearing the static
- for (int i = 0; i < width; i++) {
- float r = random(255);
- stroke(r);
- line(i, 0, i, height);
- strokeWeight (stroke);
- }//static background (creates lines randomly)
- noStroke();
- fill (bubble);
- ellipse (mouseX, mouseY, 50, 50);
- //bubble
- rectMode (CORNERS);
- fill (silver);
- noStroke();
- translate (width/11, height/-28);
- rotate (PI/32);
- rect (9, 159, 750, 662, 199);
- //soap dish
- if (mouseX < width/3) {
- soapColor = 0;
- } else if (mouseX > width/3 && mouseX < width/3*2) {
- soapColor = 1;
- } else {
- soapColor = 2;
- }
- if (keyPressed) {
- silver = silver -10;
- theKey=true;
- } else {
- silver = silver;
- theKey = false;
- }
- //press any key
- if (soapColor ==0 | mouseX>=800) {
- noStroke();
- rectMode (CORNER);
- translate (width/11, height/-28);
- rotate (PI/-50);
- fill (pinkish);
- rect (-3, 275, a, b, 63);
- //soap bar pink
- } else if (soapColor==1) {
- noStroke();
- rectMode (CORNER);
- translate (width/11, height/-28);
- rotate (PI/-50);
- fill (reddish);
- rect (-3, 275, a, b, 63);
- //soap bar red
- } else {
- noStroke();
- rectMode (CORNER);
- translate (width/11, height/-28);
- rotate (PI/-50);
- fill (magenta);
- rect (-3, 275, a, b, 63);
- //soap bar
- }
- }
Add Comment
Please, Sign In to add comment