xxxxxxxxxx
ParticleSystem ps;
float side=3;//was .2
int squares=8000;//was 12500
float fillCount=155;
float dragC=.4;//was .25
boolean clicked;
float lerpValue, lerpValue2;
int frameStart;
color myBlue;//150,204,247
void setup() {
size(1920,1080);
//pixelDensity(displayDensity());
smooth();
myBlue=color(9,163,232);//was(255,213,157);
background(myBlue);
float xPosit=width/2-((sqrt(squares)*side)/2);
float yPosit=height/2-((sqrt(squares)*side)/2);
ps=new ParticleSystem(new PVector(xPosit,yPosit));
}
void draw() {
fill(myBlue,32);
stroke(0);
rect(0,0,width,height);
if(clicked){
side -=.001;
fillCount -= 0.5;
}
if(side<=1){side=1;}
if(fillCount<=60) {fillCount=60;}
textSize(40);
textAlign(CENTER);
if(clicked){
if(frameCount-frameStart>180){
fill(0,lerpValue);
// text("p o r t f o l i o",width/2, (height/2)-40);
lerpValue +=1;
}
}
ps.run();
}//end draw
void mousePressed(){
ps.shatter();
}
void mouseClicked(){
clicked=true;
frameStart=frameCount;
}