• fullscreen
  • Bez.pde
  • Rect1.pde
  • Sect1.pde
  • ShatterClass.pde
  • Trif.pde
  • Tris.pde
  • class Bez { // give Classes names that begin with a capital letter to differentiate
      float x1;
      float y1;
      float Xspeed;
      float Yspeed;
      float spin1; 
      float gravity;
      float spinSpeed;
    
      Bez(int tempX, int tempY, float tempSpin) { // "the constructor"
        x1 = tempX;
        y1 = tempY;
        Xspeed = random(-10,10);
        Yspeed = random(-10,10);
        spin1 = 0;
        spinSpeed = tempSpin;
        gravity = 0.5;
      }
    
      void move() {
        if (bezNOW) {
    
          // OBJECT 1
          spin1 = spin1 + spinSpeed;
          x1 = x1 + Xspeed;
          y1 = y1 - Yspeed;
          Yspeed = Yspeed - gravity;
    
          // If the object hits the right side, it bounces slightly
          if (x1 >= width-30 || x1 <= 20) {
            Xspeed = Xspeed/3 * -1;
          }
    
          // If the object rises above height 30, it begins to descend
          if(y1 == 30) {
            Yspeed = Yspeed * -1;
            //      Yspeed = Yspeed * gravity;
          }
    
          // If the object hits the bottom, it stops
          if (y1 > height-5) {
            spin1 = spin1 - spinSpeed;
            y1 = height-5;
            Xspeed = Xspeed / 2;
          }
        }
        if(mouseX>200 && mouseX<300 && mouseY>0 && mouseY<30) {
          if (mousePressed) {
            Bez1 = new Bez(150,190,random(.02,.3));
            Bez2 = new Bez(160,190,random(.02,.3));
            Bez3 = new Bez(170,190,random(.02,.3));
            Bez4 = new Bez(180,190,random(.02,.3));
            Bez5 = new Bez(190,190,random(.02,.3));
            Bez6 = new Bez(200,190,random(.02,.3));
            Bez7 = new Bez(210,190,random(.02,.3));
            Bez8 = new Bez(220,190,random(.02,.3));
            Bez9 = new Bez(230,190,random(.02,.3));
            Bez10 = new Bez(240,190,random(.02,.3));
            Bez11 = new Bez(145,230,random(.02,.3));
            Bez12 = new Bez(155,230,random(.02,.3));
            Bez13 = new Bez(165,230,random(.02,.3));
            Bez14 = new Bez(175,230,random(.02,.3));
            Bez15 = new Bez(185,230,random(.02,.3));
            Bez16 = new Bez(195,230,random(.02,.3));
            Bez17 = new Bez(205,230,random(.02,.3));
            Bez18 = new Bez(215,230,random(.02,.3));
            Bez19 = new Bez(225,230,random(.02,.3));
            Bez20 = new Bez(235,230,random(.02,.3));
            Bez21 = new Bez(245,230,random(.02,.3));
            Bez22 = new Bez(150,270,random(.02,.3));
            Bez23 = new Bez(160,270,random(.02,.3));
            Bez24 = new Bez(170,270,random(.02,.3));
            Bez25 = new Bez(180,270,random(.02,.3));
            Bez26 = new Bez(190,270,random(.02,.3));
            Bez27 = new Bez(200,270,random(.02,.3));
            Bez28 = new Bez(210,270,random(.02,.3));
            Bez29 = new Bez(220,270,random(.02,.3));
            Bez30 = new Bez(230,270,random(.02,.3));
            Bez31 = new Bez(240,270,random(.02,.3));
            Bez32 = new Bez(145,310,random(.02,.3));
            Bez33 = new Bez(155,310,random(.02,.3));
            Bez34 = new Bez(165,310,random(.02,.3));
            Bez35 = new Bez(175,310,random(.02,.3));
            Bez36 = new Bez(185,310,random(.02,.3));
            Bez37 = new Bez(195,310,random(.02,.3));
            Bez38 = new Bez(205,310,random(.02,.3));
            Bez39 = new Bez(215,310,random(.02,.3));
            Bez40 = new Bez(225,310,random(.02,.3));
            Bez41 = new Bez(235,310,random(.02,.3));
            Bez42 = new Bez(245,310,random(.02,.3));
            bezNOW = false;
          }
        }
      }
    
      void display() {
        fill(160,153,94,150);
        pushMatrix();
        translate(x1,y1);
        rotate(spin1);
        quad(0,0,-5,+30,0,+60,+5,+30);
        popMatrix();
      }
    }
    
    
    class Rect1 { // give Classes names that begin with a capital letter to differentiate
      float x1;
      float y1;
      float Xspeed;
      float Yspeed;
      float spin1; 
      float gravity;
      float spinSpeed;
    
      Rect1(int tempX, int tempY, float tempSpin) { // "the constructor"
        x1 = tempX;
        y1 = tempY;
        Xspeed = random(-10,10);
        Yspeed = random(-10,10);
        spin1 = 0;
        spinSpeed = tempSpin;
        gravity = 0.5;
      }
    
      void move() {
        if (now) {
    
          // OBJECT 1
          spin1 = spin1 + spinSpeed;
          x1 = x1 + Xspeed;
          y1 = y1 - Yspeed;
          Yspeed = Yspeed - gravity;
    
          // If the object hits the right side, it bounces slightly
          if (x1 >= width-30 || x1 <= 20) {
            Xspeed = Xspeed/3 * -1;
          }
    
          // If the object rises above height 30, it begins to descend
          if(y1 == 30) {
            Yspeed = Yspeed * -1;
            //      Yspeed = Yspeed * gravity;
          }
    
          // If the object hits the bottom, it stops
          if (y1 > height-25) {
            spin1 = 0;
            y1 = height-25;
            Xspeed = Xspeed / 2;
          }
        }
        if(mouseX>0 && mouseX<100 && mouseY>0 && mouseY<30) {
          if (mousePressed) {
            Rect1a = new Rect1(205,50,random(.02,.5));
            Rect1b = new Rect1(180,75,random(.02,.5));
            now = false;
          }
        }
      }
    
      void display() {
        fill(180,135,135,150);
        pushMatrix();
        translate(x1,y1);
        rotate(spin1);
        rect(0,0,10,25);//rect 1
        popMatrix();
      }
    }
    
    
    class Sect1 { // give Classes names that begin with a capital letter to differentiate
      float x1;
      float y1;
      float Xspeed;
      float Yspeed;
      float spin1; 
      float gravity;
      float spinSpeed;
    
      Sect1(int tempX, int tempY, float tempSpin) { // "the constructor"
        x1 = tempX;
        y1 = tempY;
        Xspeed = random(-10,10);
        Yspeed = random(-10,10);
        spin1 = 0;
        spinSpeed = tempSpin;
        gravity = 0.5;
      }
    
      void move() {
        if (now) {
    
          // OBJECT 1
          spin1 = spin1 + spinSpeed;
          x1 = x1 + Xspeed;
          y1 = y1 - Yspeed;
          Yspeed = Yspeed - gravity;
    
          // If the object hits the right side, it bounces slightly
          if (x1 >= width-30 || x1 <= 20) {
            Xspeed = Xspeed/3 * -1;
          }
    
          // If the object rises above height 30, it begins to descend
          if(y1 <= 30) {
            Yspeed = Yspeed * -1;
            //      Yspeed = Yspeed * gravity;
          }
    
          // If the object hits the bottom, it stops
          if (y1 > height-25) {
            spin1 = 0;
            y1 = height-25;
            Xspeed = Xspeed / 2;
          }
        }
        if(mouseX>0 && mouseX<100 && mouseY>0 && mouseY<30) {
          if (mousePressed) {
            Sect1a = new Sect1(180,50,random(.02,.5));
            Sect1b = new Sect1(190,75,random(.02,.5));
            now = false;
          }
        }
        }
    
        void display() {
          fill(180,135,135,150);
          pushMatrix();
          translate(x1,y1);
          rotate(spin1);
          rect(0,0,25,25);//rect 1
          popMatrix();
        }
      }
    
    
    Sect1 Sect1a;
    Sect1 Sect1b;
    Rect1 Rect1a;
    Rect1 Rect1b;
    
    boolean rectShapes = false;
    boolean now = false;
    
    float qx = 50;
    float qy = 50;
    
    //  ************************* Triangles
    boolean triShapes = false;
    boolean triNOW = false;
    
    Tris Tris1;
    Tris Tris2;
    Tris Tris3;
    Tris Tris4;
    Tris Tris5;
    Tris Tris6;
    Tris Tris7;
    Tris Tris8;
    Tris Tris9;
    Tris Tris10;
    Tris Tris11;
    Tris Tris12;
    Tris Tris13;
    Tris Tris14;
    Tris Tris15;
    
    
    Trif Trif1;
    Trif Trif2;
    Trif Trif3;
    Trif Trif4;
    Trif Trif5;
    Trif Trif6;
    Trif Trif7;
    Trif Trif8;
    Trif Trif9;
    Trif Trif10;
    
    //  ************************* Quads(Bez)
    boolean bezShapes = false;
    boolean bezNOW = false;
    
    Bez Bez1;
    Bez Bez2;
    Bez Bez3;
    Bez Bez4;
    Bez Bez5;
    Bez Bez6;
    Bez Bez7;
    Bez Bez8;
    Bez Bez9;
    Bez Bez10;
    Bez Bez11;
    Bez Bez12;
    Bez Bez13;
    Bez Bez14;
    Bez Bez15;
    Bez Bez16;
    Bez Bez17;
    Bez Bez18;
    Bez Bez19;
    Bez Bez20;
    Bez Bez21;
    Bez Bez22;
    Bez Bez23;
    Bez Bez24;
    Bez Bez25;
    Bez Bez26;
    Bez Bez27;
    Bez Bez28;
    Bez Bez29;
    Bez Bez30;
    Bez Bez31;
    Bez Bez32;
    Bez Bez33;
    Bez Bez34;
    Bez Bez35;
    Bez Bez36;
    Bez Bez37;
    Bez Bez38;
    Bez Bez39;
    Bez Bez40;
    Bez Bez41;
    Bez Bez42;
    
    int bg = 255;
    boolean bgColor = false;
    float gravity = 0.5;
    
    void setup() {
      size(400,550);
      smooth();
      frameRate(48);
      //Squares
      Sect1a = new Sect1(180,50,random(.02,.5));
      Sect1b = new Sect1(190,75,random(.02,.5));
      Rect1a = new Rect1(205,50,random(.02,.5));
      Rect1b = new Rect1(180,75,random(.02,.5));
      //Triangles
      Tris1 = new Tris(185,100,random(.02,.5));
      Tris2 = new Tris(205,100,random(.02,.5));
      Tris3 = new Tris(225,100,random(.02,.5));
      Tris4 = new Tris(165,100,random(.02,.5));
      Tris5 = new Tris(145,100,random(.02,.5));
      Tris6 = new Tris(195,120,random(.02,.5));
      Tris7 = new Tris(215,120,random(.02,.5));
      Tris8 = new Tris(175,120,random(.02,.5));
      Tris9 = new Tris(155,120,random(.02,.5));
      Tris10 = new Tris(205,140,random(.02,.5));
      Tris11 = new Tris(185,140,random(.02,.5));
      Tris12 = new Tris(165,140,random(.02,.5));
      Tris13 = new Tris(195,160,random(.02,.5));
      Tris14 = new Tris(175,160,random(.02,.5));
      Tris15 = new Tris(185,180,random(.02,.5));
    
      Trif1 = new Trif(215,120,random(.02,.5));
      Trif2 = new Trif(235,120,random(.02,.5));
      Trif3 = new Trif(195,120,random(.02,.5));
      Trif4 = new Trif(175,120,random(.02,.5));
      Trif5 = new Trif(185,140,random(.02,.5));
      Trif6 = new Trif(205,140,random(.02,.5));
      Trif7 = new Trif(225,140,random(.02,.5));
      Trif8 = new Trif(215,160,random(.02,.5));
      Trif9 = new Trif(195,160,random(.02,.5));
      Trif10 = new Trif(205,180,random(.02,.5));
    
      //Quads (Bez)
      Bez1 = new Bez(150,190,random(.02,.5));
      Bez2 = new Bez(160,190,random(.02,.5));
      Bez3 = new Bez(170,190,random(.02,.5));
      Bez4 = new Bez(180,190,random(.02,.5));
      Bez5 = new Bez(190,190,random(.02,.5));
      Bez6 = new Bez(200,190,random(.02,.5));
      Bez7 = new Bez(210,190,random(.02,.5));
      Bez8 = new Bez(220,190,random(.02,.5));
      Bez9 = new Bez(230,190,random(.02,.5));
      Bez10 = new Bez(240,190,random(.02,.5));
      Bez11 = new Bez(145,230,random(.02,.5));
      Bez12 = new Bez(155,230,random(.02,.5));
      Bez13 = new Bez(165,230,random(.02,.5));
      Bez14 = new Bez(175,230,random(.02,.5));
      Bez15 = new Bez(185,230,random(.02,.5));
      Bez16 = new Bez(195,230,random(.02,.5));
      Bez17 = new Bez(205,230,random(.02,.5));
      Bez18 = new Bez(215,230,random(.02,.5));
      Bez19 = new Bez(225,230,random(.02,.5));
      Bez20 = new Bez(235,230,random(.02,.5));
      Bez21 = new Bez(245,230,random(.02,.5));
      Bez22 = new Bez(150,270,random(.02,.5));
      Bez23 = new Bez(160,270,random(.02,.5));
      Bez24 = new Bez(170,270,random(.02,.5));
      Bez25 = new Bez(180,270,random(.02,.5));
      Bez26 = new Bez(190,270,random(.02,.5));
      Bez27 = new Bez(200,270,random(.02,.5));
      Bez28 = new Bez(210,270,random(.02,.5));
      Bez29 = new Bez(220,270,random(.02,.5));
      Bez30 = new Bez(230,270,random(.02,.5));
      Bez31 = new Bez(240,270,random(.02,.5));
      Bez32 = new Bez(145,310,random(.02,.5));
      Bez33 = new Bez(155,310,random(.02,.5));
      Bez34 = new Bez(165,310,random(.02,.5));
      Bez35 = new Bez(175,310,random(.02,.5));
      Bez36 = new Bez(185,310,random(.02,.5));
      Bez37 = new Bez(195,310,random(.02,.5));
      Bez38 = new Bez(205,310,random(.02,.5));
      Bez39 = new Bez(215,310,random(.02,.5));
      Bez40 = new Bez(225,310,random(.02,.5));
      Bez41 = new Bez(235,310,random(.02,.5));
      Bez42 = new Bez(245,310,random(.02,.5));
    }
    
    void draw() {
      noStroke();
      fill(bg);
      rect(0,0,400,550);
    
      //Buttons
      fill(250,95,204);
      rect(0,0,100,30);
      fill(217,234,25);
      rect(100,0,100,30);
      fill(16,215,85);
      rect(200,0,100,30);
      fill(0);
      rect(300,0,100,30);
      //Roll over hightlights
      if(mouseX>0 && mouseX<100 && mouseY>0 && mouseY<30) {
        fill(255,255,255,100);
        rect(0,0,100,30);
      }
    
      if(mouseX>100 && mouseX<200 && mouseY>0 && mouseY<30) {
        fill(255,255,255,140);
        rect(100,0,100,30);
      }
    
      if(mouseX>200 && mouseX<300 && mouseY>0 && mouseY<30) {
        fill(255,255,255,100);
        rect(200,0,100,30);
      }
      if(mouseX>300 && mouseX<400 && mouseY>0 && mouseY<30) {
        fill(255,255,255,100);
        rect(300,0,100,30);
      }
    
    
      //Bring the shapes
      if (rectShapes) {
        Sect1a.move();
        Sect1a.display();
        Sect1b.move();
        Sect1b.display();
        Rect1a.move();
        Rect1a.display();
        Rect1b.move();
        Rect1b.display();
      }
    
      if (triShapes) {
        Tris1.move();
        Tris1.display();
        Tris2.move();
        Tris2.display();
        Tris3.move();
        Tris3.display();
        Tris4.move();
        Tris4.display();
        Tris5.move();
        Tris5.display();
        Tris6.move();
        Tris6.display();
        Tris7.move();
        Tris7.display();
        Tris8.move();
        Tris8.display();
        Tris9.move();
        Tris9.display();
        Tris10.move();
        Tris10.display();
        Tris11.move();
        Tris11.display();
        Tris12.move();
        Tris12.display();
        Tris13.move();
        Tris13.display();
        Tris14.move();
        Tris14.display();
        Tris15.move();
        Tris15.display();
    
        Trif1.move();
        Trif1.display();
        Trif2.move();
        Trif2.display();
        Trif3.move();
        Trif3.display();
        Trif4.move();
        Trif4.display();
        Trif5.move();
        Trif5.display();
        Trif6.move();
        Trif6.display();
        Trif7.move();
        Trif7.display();
        Trif8.move();
        Trif8.display();
        Trif9.move();
        Trif9.display();
        Trif10.move();
        Trif10.display();
      }
      if (bezShapes) {
        Bez1.move();
        Bez1.display();
        Bez2.move();
        Bez2.display();
        Bez3.move();
        Bez3.display();
        Bez4.move();
        Bez4.display();
        Bez5.move();
        Bez5.display();
        Bez6.move();
        Bez6.display();
        Bez7.move();
        Bez7.display();
        Bez8.move();
        Bez8.display();
        Bez9.move();
        Bez9.display();
        Bez10.move();
        Bez10.display();
        Bez11.move();
        Bez11.display();
        Bez12.move();
        Bez12.display();
        Bez13.move();
        Bez13.display();
        Bez14.move();
        Bez14.display();
        Bez15.move();
        Bez15.display();
        Bez16.move();
        Bez16.display();
        Bez17.move();
        Bez17.display();
        Bez18.move();
        Bez18.display();
        Bez19.move();
        Bez19.display();
        Bez20.move();
        Bez20.display();
        Bez21.move();
        Bez21.display();
        Bez22.move();
        Bez22.display();
        Bez23.move();
        Bez23.display();
        Bez24.move();
        Bez24.display();
        Bez25.move();
        Bez25.display();
        Bez26.move();
        Bez26.display();
        Bez27.move();
        Bez27.display();
        Bez28.move();
        Bez28.display();
        Bez29.move();
        Bez29.display();
        Bez30.move();
        Bez30.display();
        Bez31.move();
        Bez31.display();
        Bez32.move();
        Bez32.display();
        Bez33.move();
        Bez33.display();
        Bez34.move();
        Bez34.display();
        Bez35.move();
        Bez35.display();
        Bez36.move();
        Bez36.display();
        Bez37.move();
        Bez37.display();
        Bez38.move();
        Bez38.display();
        Bez39.move();
        Bez39.display();
        Bez40.move();
        Bez40.display();
        Bez41.move();
        Bez41.display();
        Bez42.move();
        Bez42.display();
      }
      if(bgColor == true) {
        fill(255);
        rect(300,0,100,30);
        if(mouseX>300 && mouseX<400 && mouseY>0 && mouseY<30) {
          fill(10,10,10,30);
          rect(300,0,100,30);
        }
      }
    }// END DRAW
    
    
    
    void mousePressed() { 
    
      if(mouseX>0 && mouseX<100 && mouseY>0 && mouseY<30) {
        rectShapes = !rectShapes;
      }
    
      if(mouseX>100 && mouseX<200 && mouseY>0 && mouseY<30) {
        triShapes = !triShapes;
      }
      if(mouseX>200 && mouseX<300 && mouseY>0 && mouseY<30) {
        bezShapes = !bezShapes;
      }
    
      if(mouseX>0 && mouseX<550 && mouseY>50 && mouseY<550) {
        if (rectShapes == true) {
          now = !now;
        }
        if (triShapes == true) {
          triNOW = !triNOW;
        }
        if (bezShapes == true) {
          bezNOW = !bezNOW;
        }
      }
    
      if(mouseX>300 && mouseX<400 && mouseY>0 && mouseY<30) {
        bgColor = !bgColor;
        if(bgColor == true) {
          bg = 0;
        }
        else {
          bg = 255;
        }
      }
    }
    
    
    class Trif {
      float spinT1;
      float tx1;
      float ty1;
      float txSpeed;
      float tySpeed;
      float spinSpeed;
    
      Trif(int tempX, int tempY, float tempSpin) {
        tx1 = tempX;
        ty1 = tempY;
        txSpeed = random(-10,10);
        tySpeed = random(-12,10);
        spinT1 = PI;
        spinSpeed = tempSpin;
        gravity = 0.5;
      }
    
      void move() {
        if (triNOW) {
          spinT1 = spinT1+spinSpeed;
          tx1 = tx1 + txSpeed;
          ty1 = ty1 - tySpeed;
          tySpeed = tySpeed - gravity;
    
          // If the object hits the side, it bounces slightly
          if (tx1 >= width-20 || tx1 < 20) {
            txSpeed = txSpeed/3 * -1;
          }
    
          // If the object rises above height 30, it begins to descend
          if(ty1 == 30) {
            tySpeed = tySpeed * -1;
            //      Yspeed = Yspeed * gravity;
          }
    
          // If the object hits the bottom, it stops
          if (ty1 > height-20) {
            spinT1 = PI;
            ty1 = height;
            txSpeed = txSpeed / 2;
          }
          if(mouseX>100 && mouseX<200 && mouseY>0 && mouseY<30) {
            if (mousePressed) {
              triNOW = false;
            }
          }
        }
      }
    
      void display() {
        fill(130,135,180,150);
        pushMatrix();
        translate(tx1,ty1);
        rotate(spinT1);
        triangle(0, 0, +10, +20, +20, 0);
        popMatrix();
      }
    }
    
    
    class Tris {
      float spinT1;
      float tx1;
      float ty1;
      float txSpeed;
      float tySpeed;
      float spinSpeed;
    
      Tris(int tempX, int tempY, float tempSpin) {
        tx1 = tempX;
        ty1 = tempY;
        txSpeed = random(-10,10);
        tySpeed = random(-12,10);
        spinT1 = 0;
        spinSpeed = tempSpin;
        gravity = 0.5;
      }
    
      void move() {
        if (triNOW) {
          spinT1 = spinT1+spinSpeed;
          tx1 = tx1 + txSpeed;
          ty1 = ty1 - tySpeed;
          tySpeed = tySpeed - gravity;
    
          // If the object hits the side, it bounces slightly
          if (tx1 >= width-20 || tx1 < 20) {
            txSpeed = txSpeed/3 * -1;
          }
    
          // If the object rises above height -30, it begins to descend
          if(ty1 == 30) {
            tySpeed = tySpeed * -1;
            //      Yspeed = Yspeed * gravity;
          }
    
          // If the object hits the bottom, it stops
          if (ty1 > height-20) {
            spinT1 = 0;
            ty1 = height-20;
            txSpeed = txSpeed / 2;
          }
          if(mouseX>100 && mouseX<200 && mouseY>0 && mouseY<30) {
            if (mousePressed) {
              Tris1 = new Tris(185,100,random(.02,.5));
              Tris2 = new Tris(205,100,random(.02,.5));
              Tris3 = new Tris(225,100,random(.02,.5));
              Tris4 = new Tris(165,100,random(.02,.5));
              Tris5 = new Tris(145,100,random(.02,.5));
              Tris6 = new Tris(195,120,random(.02,.5));
              Tris7 = new Tris(215,120,random(.02,.5));
              Tris8 = new Tris(175,120,random(.02,.5));
              Tris9 = new Tris(155,120,random(.02,.5));
              Tris10 = new Tris(205,140,random(.02,.5));
              Tris11 = new Tris(185,140,random(.02,.5));
              Tris12 = new Tris(165,140,random(.02,.5));
              Tris13 = new Tris(195,160,random(.02,.5));
              Tris14 = new Tris(175,160,random(.02,.5));
              Tris15 = new Tris(185,180,random(.02,.5));
              //
              Trif1 = new Trif(215,120,random(.02,.5));
              Trif2 = new Trif(235,120,random(.02,.5));
              Trif3 = new Trif(195,120,random(.02,.5));
              Trif4 = new Trif(175,120,random(.02,.5));
              Trif2 = new Trif(235,120,random(.02,.5));
              Trif3 = new Trif(195,120,random(.02,.5));
              Trif4 = new Trif(175,120,random(.02,.5));
              Trif5 = new Trif(185,140,random(.02,.5));
              Trif6 = new Trif(205,140,random(.02,.5));
              Trif7 = new Trif(225,140,random(.02,.5));
              Trif8 = new Trif(215,160,random(.02,.5));
              Trif9 = new Trif(195,160,random(.02,.5));
              Trif10 = new Trif(205,180,random(.02,.5));
    
              triNOW = false;
            }
          }
        }
      }
    
      void display() {
        fill(130,135,180,150);
        pushMatrix();
        translate(tx1,ty1);
        rotate(spinT1);
        triangle(0, 0, +10, +20, +20, 0);
        popMatrix();
      }
    }
    
    

    code

    tweaks (0)

    about this sketch

    This sketch is running as Java applet, exported from Processing.

    license

    advertisement

    Jeremy

    ShatterClass

    Add to Faves Me Likey@!
    You must login/register to add this sketch to your favorites.

    Clicking the top-left three buttons brings up shapes in the lower field. Then clicking on the shapes in the lower field causes them to shatter randomly(clicking the lower field again before the pieces hit the floor, pauses the motion). Top-left three can be clicked again to clear lower field and again to restore original shapes. Top-right button changes the color of the background between white and black.

    You need to login/register to comment.