Files
FreeJ/scripts/processing/topics/loadfile1.pde
Jaromil ae7b1ad056 progresses on processing script
processing-js 0.4 has been merged in some relevant parts
basic and topic scripts added for test
color handling fixed, more scripts show up now
2010-02-12 18:36:54 +01:00

24 lines
461 B
Plaintext

String[] lines;
int index = 0;
void setup() {
size(200, 200);
background(0);
stroke(255);
frameRate(12);
lines = loadStrings("positions.txt");
}
void draw() {
if (index < lines.length) {
String[] pieces = split(lines[index], '\t');
if (pieces.length == 2) {
int x = int(pieces[0]) * 2;
int y = int(pieces[1]) * 2;
point(x, y);
}
// Go to the next line for the next run through draw()
index = index + 1;
}
}