I have a sketch that randomly pulls words from a .txt document and places them in random spots on the sketch. I want the words to fade out after a few seconds, but can't figure out how. Here is the code:
float r;
float g;
float b;
float a;
float diam;
float x;
float y;
void setup() {
size(1280,720, P3D);
background(0);
smooth();
frameRate(2);
// textSize(30);
PFont font;
font = loadFont("SansSerif-48.vlw");
textFont(font, 40);
fill(255);
text("I'M SORRY.", 30, 50);
text("I'M HAPPY.", 30, 86);
textSize(15);
}
void draw() {
// Each time through draw(), new random numbers are picked for a new ellipse.