mirror of
https://github.com/dyne/FreeJ.git
synced 2026-02-05 12:39: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
27 lines
391 B
Plaintext
27 lines
391 B
Plaintext
int a = 0; // Create a variable "a" of the datatype "int"
|
|
float b = 0.0; // Create a variable "b" of the datatype "float"
|
|
|
|
void setup()
|
|
{
|
|
size(200, 200);
|
|
stroke(255);
|
|
frameRate(30);
|
|
}
|
|
|
|
void draw()
|
|
{
|
|
background(51);
|
|
|
|
a = a + 1;
|
|
b = b + 0.2;
|
|
line(a, 0, a, height/2);
|
|
line(b, height/2, b, height);
|
|
|
|
if(a > width) {
|
|
a = 0;
|
|
}
|
|
if(b > width) {
|
|
b = 0;
|
|
}
|
|
}
|