karmi (owner)

Revisions

gist: 220678 Download_button fork
public
Public Clone URL: git://gist.github.com/220678.git
Embed All Files: show embed
JavaScript #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
void setup()
{
  size(500, 500);
  noStroke();
  colorMode(RGB, 255, 255, 255, 100);
  rectMode(RADIUS);
  frameRate(25);
  num = 0;
  max = 100;
  items = Array();
}
 
void draw()
{
    int x = random(1000);
    int y = random(500);
    int size = random(100);
 
    fill(0, 0, 0, random(100));
    rect(x, y, size, size)
    items.push( [x, y, size, size] )
 
 
    if ( num >= max ) {
      clear = items.shift()
      if ( clear ) {
        fill(255, 255, 255, 100)
        rect( clear[0], clear[1], clear[2], clear[3] )
      }
    }
 
    num++;
 
}