Created
March 24, 2018 13:50
-
-
Save IosysPio/b6a8e50ffa2b7073c3bb1a458299b40b to your computer and use it in GitHub Desktop.
random_test_001
This file contains 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
PFont f; | |
void setup() { | |
loop(); | |
size(320, 180); | |
background(0); | |
frameRate(30); | |
// Create the font | |
// printArray(PFont.list()); | |
f = createFont("Source Code Variable", 36); | |
textFont(f); | |
} | |
void draw() { | |
background(152); | |
textAlign(CENTER); | |
int x = int(width * 0.5), y = int(height * 0.5); | |
fill(0); | |
text(int(random(500)), x, y); | |
if (mousePressed) { | |
loop(); | |
redraw(); | |
} else { | |
noLoop(); | |
} | |
} | |
void mousePressed() { | |
loop(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment