• fullscreen
  • sketch48975.pde
  • void setup() {
      size(640, 400);
      background(255);
    }
    
    void draw() {
    
      smooth();
      noStroke();
      float a = map(mouseX, 0, width, 0, 100);
      float diameter = map(mouseY, 0, height, 1, 50);
      fill(#5CD6E3, a);
    
      if (mousePressed && (mouseButton == LEFT)) {
        ellipse(mouseX, mouseY, diameter, diameter);
      }
      else if (mousePressed && (mouseButton == RIGHT)) {
        background(255);
      }
      else {
        // Do Nothing
      }
    }
                                                    

    code

    tweaks (0)

    about this sketch

    This sketch is running in HTML5 using Processingjs.

    license

    advertisement

    David Smith

    Hello World

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

    My first processing sketch. Wanted to play with different opacities for a later project.

    Click to draw circles. Circles are bigger and less transparent towards the bottom right.

    Right click to clear screen.

    You need to login/register to comment.