Skip to content

Instantly share code, notes, and snippets.

@dimkir
Created November 12, 2013 15:36
Show Gist options
  • Save dimkir/7432971 to your computer and use it in GitHub Desktop.
Save dimkir/7432971 to your computer and use it in GitHub Desktop.
Processing sketch : example02_random_words
import simplicity.*;
void setup(){
size(800,600);
textFont(createFont("Arial", 34));
fill(0);
println(RandomNames.info());
frameRate(10);
}
void mousePressed(){
String randomName = RandomNames.getName();
text(randomName, mouseX, mouseY);
}
void draw(){
fade(255, 5);
}
void fade(color c, int byteAlpha){
pushStyle();
fill(c, byteAlpha);
noStroke();
rect(0,0, width, height);
popStyle();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment