Created
November 12, 2013 15:36
-
-
Save dimkir/7432971 to your computer and use it in GitHub Desktop.
Processing sketch : example02_random_words
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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