Knowledge Base‎ > ‎Programming‎ > ‎Processing‎ > ‎Processing Robot‎ > ‎

Processing Demo Code


int x=0;

int y=0;

void setup() {

}


void draw() {
  background(100);
  x = x + 1;
  rect(x,y,10,10);

}

void mouseClicked() {
  println(mouseX);
  
  if (mouseX> 0 && mouseX < 10) {
    println( "yes");    
  }
  
  y = y + 10;


}
Comments