Skip to content

Instantly share code, notes, and snippets.

@dimkir
Created October 18, 2013 09:45
Show Gist options
  • Select an option

  • Save dimkir/7039181 to your computer and use it in GitHub Desktop.

Select an option

Save dimkir/7039181 to your computer and use it in GitHub Desktop.
Created using Sketch2Tweet tool
//#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();
}
@dimkir
Copy link
Copy Markdown
Author

dimkir commented Oct 18, 2013

This is comment with sketch screenshot url: imge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment