The title sums it up. I'm also a newbie to processing, so please, explain my error to me like I'm 5.
void setup(){
size(500,500);
int(q=1)
}
void draw(){
if(q>0){
float(z=random(255));
float(x=random(255));
float(c=random(255));
background(z,x,c)
}
delay(500)
}
I use the browser version, if that matters.
I tried making an "if" loop, a "while" loop, I wanted it to change background color every 1/2 seconds, but instead it just changes once and then crashes. I use the browser version, if that matters.
The following code should run without errors. Keep reading and writing code.
int q = 1;
void setup() {
size(500, 500);
}
void draw() {
if (q > 0) {
float z = random(255);
float x = random(255);
float c = random(255);
background(z, x, c);
}
delay(500);
}