mirror of
https://github.com/dyne/FreeJ.git
synced 2026-02-07 13:29:47 +01:00
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
24 lines
461 B
Plaintext
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;
|
|
}
|
|
}
|