Created
October 18, 2013 09:45
-
-
Save dimkir/7039181 to your computer and use it in GitHub Desktop.
Created using Sketch2Tweet tool
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
| //#tuelit13 | |
| int h = 0; | |
| // max text size | |
| int C_MAX_SIZE = 48; | |
| void setup() { | |
| size(250, 250); | |
| textFont(createFont("Arial", C_MAX_SIZE)); | |
| colorMode(HSB,255); | |
| } | |
| float t= 0; | |
| float td = 0.01; | |
| float nextSize(float maxSize){ | |
| t += td; | |
| return maxSize * sin(t); | |
| } | |
| void draw() { | |
| h++; | |
| //background(255); | |
| fade(color(#FFFFFF), 10); | |
| fill(0); | |
| textSize(nextSize(C_MAX_SIZE)); | |
| textAlign(CENTER); | |
| translate(width/2, height/2); | |
| rotate(h); | |
| fill(randomColor()); | |
| text("Hello World", 0, 0); | |
| } | |
| color randomColor(){ | |
| return color((int)random(255), 255,255); | |
| } | |
| // fades screen to color | |
| void fade(color k, int alphaByte){ | |
| pushStyle(); | |
| fill(k, alphaByte); | |
| rect(0,0, width, height); | |
| popStyle(); | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is comment with sketch screenshot url: