Skip to content

Instantly share code, notes, and snippets.

@KrabCode
Created February 10, 2022 11:50
Show Gist options
  • Save KrabCode/df435abe801a128e0ebdc0e4bafc7269 to your computer and use it in GitHub Desktop.
Save KrabCode/df435abe801a128e0ebdc0e4bafc7269 to your computer and use it in GitHub Desktop.
int lineCount = 10;
int charsPerLine = 50;
int step;
PFont discordFont;
void setup() {
size(600, 200);
discordFont = createFont("Uni Sans Regular.ttf", 16);
textFont(discordFont);
step = width / charsPerLine;
frameRate(60);
}
void draw() {
background(color(0xFF36393E));
for (int i = 0; i < lineCount; i++) {
float y = map(i, 0, lineCount-1, 16, height-4);
float speed = 1+4*noise(y*32456);
drawText(y, speed);
}
if (frameCount <= step * 50) {
//saveFrame("out/####.jpg");
}
}
void drawText(float y, float speed) {
noStroke();
fill(255);
for (int x = -50; x < width + 50; x+= step) {
float offset = (frameCount * speed) % step;
text("A", x + offset, y);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment