All pastes #2086415 Raw Edit

Stuff

public text v1 · immutable
#2086415 ·published 2011-10-03 10:04 UTC
rendered paste body
// make it scroll
// make those colors fade in/out


PFont fontA;

int posX = 0;
int cR = 0, cG = 0, cB = 0;

void setup() 
{
  size(800, 200);
  smooth();
  fontA = loadFont("CourierNew36.vlw");
  textFont(fontA, 32);
} 

void draw() 
{
  background(0);

  fill(cR,cG,cB);

  cR = cR + 1;
  cB = cR * 2;
  cG = cG + cR - 5;
  if(cR > 255) cR = 0;
  if(cB > 255) cB = 0;
  if(cG > 255) cG = 0;
  if(cR < 0) cR = 0;
  if(cB < 0) cB = 0;
  if(cG < 0) cG = 0;

  text("jag gillar potatis", 10 + posX, 40);
  
  posX = posX + 1;
  if (posX > width) posX = -width;
}