ICC
< back to sketch

int i;
int bg;

void setup(){
  size(300,300);
  background(0);
  ellipseMode(CENTER_DIAMETER);
}
void loop(){

  background(5*bg,5*bg,5*bg);
  //frame
  if(mousePressed){

    for(int f = 1 ; f < 20 ; f =f+1){
      fill(0,0,f*7);
      noStroke();
      ellipse(120,170+f-bg/3, 20, 80-f+bg);

    }
    for(int f = 1 ; f < 20 ; f =f+1){
      fill(f*6,0,0);
      noStroke();
      ellipse(120,190+f-bg/3, 17, 50-f+bg);
    }
    for(int f = 1 ; f < 20 ; f =f+1){
      fill(f*6,f*6,0);
      noStroke();
      ellipse(120,200+f-bg/3, 7, 20-f+bg);

    }
    bg=bg+1;

    if(bg >100){
      bg=100;
    }

  }else{

    bg =0;
  }

  println(bg);

  // candle
  fill(255);
  stroke(bg);
  rect(109, 215, 22, 90);

  fill(bg,bg,bg);
  stroke(bg,bg,bg);
  rect(112, 215, 5, 90);

}

< back to sketch