• fullscreen
  • sketch_feb09a.pde
  • void setup() {
      size(620, 620);
    }
    
    void draw() {
      if (mousePressed) {
        fill(219,24,24);
      } else {
        fill(5,60,250);
      }
      triangle(mouseX, mouseY, 30, 75, 58, 20);
    }
    //This program creates a window that is 620 pixels wide and high.
    //It creates a triangle that copies and moves based on the mouse movement
    //upon clicking the mouse, the triangle will turn from blue to red
    

    code

    tweaks (0)

    about this sketch

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

    license

    advertisement

    Josh Z

    First Project

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

    My first processing sketch, uses triangles and two of my favorite colors to create a visual effect.

    You need to login/register to comment.