We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi! With my beginner's understanding of things, below code should loop once a second, showing/not showing a circle. Result is not like that though, looks like it's looping very quickly....
int state=0;
void setup()
{
size (200, 200);
background (0);
frameRate=1; //1 second loop
}
void draw()
{
if (state==0)
{
state=1; //toggle state
background (0); //clear screen
fill (255); //ellipse visible
ellipse (100, 100, 10, 10); //draw it
}
else
{
state=0; //toggle state
background (0); //clear screen
fill (0); //ellipse invisible
ellipse (100, 100, 10, 10); //draw it
}
}
Thanks for looking! Ste.
Answers
https://forum.Processing.org/two/discussion/8045/how-to-format-code-and-text
Perhaps you should use function frameRate():
https://Processing.org/reference/frameRate_.html
Crikey, that did it. Thanks so much!!