mirror of
https://github.com/processing/processing4.git
synced 2026-02-14 02:45:36 +01:00
20 lines
357 B
Plaintext
20 lines
357 B
Plaintext
import processing.opengl.*;
|
|
|
|
public void setup() {
|
|
size(800, 600, OPENGL);
|
|
orientation(LANDSCAPE);
|
|
|
|
noStroke();
|
|
fill(0, 1);
|
|
}
|
|
|
|
public void draw() {
|
|
background(255);
|
|
for (int i = 0; i < 5000; i++) {
|
|
float x = random(width);
|
|
float y = random(height);
|
|
rect(x, y, 30, 30);
|
|
}
|
|
if (frameCount % 10 == 0) println(frameRate);
|
|
}
|