My teacher said that the draw() method run at many times per second, and it always clear the screen.
But it doesn’t seems like it. By his teachings this code should draw nothing as it is run only once. Than it will be erased.
boolean test = true;
void setup(){
size(640,480);
}
void draw(){
if(test){
for(int i = 0; i < 640; i++){
point(i,240);
}
test = false;
}
}
I do not understand this, or what he said was wrong?
Yes, he said the references in https://processing.org/ is helpful.
Honestly I feel stupid, because my question is clearly answered there.
But besides the references we didn’t get anyhelp like a code example or something like this. Only the tasks descriptions.