Thursday, August 22, 2013

Processing on desktop vs Processing for Android

It's the same code run Processing on desktop and Android, with Android Mode.

Run on Nexus One:

Run on desktop:


The example code:
void setup(){
  size(400, 300);
  background(0);
  stroke(255);
}

void draw() {

  noFill();
  
  if(mousePressed){
    background(0);
    point(mouseX, mouseY);
    line(80, 50, mouseX, mouseY);
    line(50, 200, 350, 250);
    curve(80, 50, mouseX, mouseY, 50, 200, 350, 250);

  }
  
}


Related:
- Setup Processing for Android development
- Hello World of Processing for Android

Cross post: Arduino-er blog - Processing on desktop vs Processing for Android

No comments: