letter[] alphaB; PFont bigText; float desire; float maxDist = 240; String Alphabet[] = split("A B C D E F G H I J K L M N O B Q R S T U V W X Y Z",' '); String dispText; void setup(){ alphaB = new letter[Alphabet.length]; float spacing = 5; for(int i = 0; i < Alphabet.length; i++){ String thisLetter = Alphabet[i]; spacing = spacing + 23; alphaB[i] = new letter(spacing, 300, thisLetter); } bigText = loadFont("OhLaLa-40.vlw"); textFont(bigText); size(640,480); fill(0); } void draw(){ background(255); for(int i = 0; i < Alphabet.length; i++){ alphaB[i].display(); alphaB[i].update(mouseX); } } class letter { float lX, lY; String thisLetter; float newX, newY, origX, origY, fontNow, fontGoal; letter(float _lX, float _lY, String _thisLetter){ lX = _lX; origX = _lX; lY = _lY; origY = _lY; thisLetter = _thisLetter; } void update(int theX){ desire = map(theX,width,0, 0, 1); println(desire); newX = (random(0,(lX+maxDist))); newY = (random(0,(lY+maxDist))); newX =(abs(1-desire)*newX) + (desire*origX); newY =(abs(1-desire)*newY) + (desire*origY); lX = (desire*lX) + (abs(1-desire)*newX); lY = (desire*lY) + (abs(1-desire)*newY); if(fontNow > fontGoal-1 && fontNow < fontGoal+1){ fontGoal = 40 * random((desire*1.15),1.17); } else { fontNow = (0.9*fontNow) + (0.1*fontGoal); } textSize(fontNow); } void display(){ text(thisLetter, lX, lY); } }