speed and position:
- Show Sketch
/* @pjs font=/media/css/Chunkfive-webfont.ttf; */
/** @peep sketchcode */
String scrollingText = "britty k";
float x;
float dx = -2;
void setup() {
size(200, 200);
PFont font = createFont("/media/css/Chunkfive-webfont.ttf", 72);
textFont(font);
x = width;
}
void draw() {
background(204);
fill(0);
textAlign(LEFT, CENTER);
text(scrollingText, x, height/5 + 20);
x += dx;
if (x <= -textWidth(scrollingText)) x = 200;
}
self uploaded:
Nothing in the gallery yet!
Comments
Nobody has said anything yet.