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
29 lines
347 B
Plaintext
29 lines
347 B
Plaintext
float a = 0.0;
|
|
float s = 0.0;
|
|
|
|
void setup()
|
|
{
|
|
size(200,200);
|
|
noStroke();
|
|
rectMode(CENTER);
|
|
frameRate(30);
|
|
}
|
|
|
|
void draw()
|
|
{
|
|
background(102);
|
|
|
|
a = a + 0.04;
|
|
s = cos(a)*2;
|
|
|
|
translate(width/2, height/2);
|
|
scale(s);
|
|
fill(51);
|
|
rect(0, 0, 50, 50);
|
|
|
|
translate(75, 0);
|
|
fill(255);
|
|
scale(s);
|
|
rect(0, 0, 50, 50);
|
|
}
|