mirror of
https://github.com/dyne/FreeJ.git
synced 2026-02-05 20:49:15 +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
23 lines
410 B
Plaintext
23 lines
410 B
Plaintext
float max_distance;
|
|
|
|
void setup() {
|
|
size(200, 200);
|
|
smooth();
|
|
noStroke();
|
|
max_distance = dist(0, 0, width, height);
|
|
}
|
|
|
|
void draw()
|
|
{
|
|
background(51);
|
|
|
|
for(int i = 0; i <= width; i += 20) {
|
|
for(int j = 0; j <= width; j += 20) {
|
|
float size = dist(mouseX, mouseY, i, j);
|
|
size = size/max_distance * 66;
|
|
//opera.postError(i, j, size);
|
|
ellipse(i, j, size, size);
|
|
}
|
|
}
|
|
}
|