xxxxxxxxxx
PImage pimg;
int w, h;
void setup() {
size(800, 500, P2D);
pimg = loadImage("CarsonCity.jpg");
}
void draw() {
if(w == 0){
w = pimg.width;
h = pimg.height;
// console.log("w: " + w);
}
background(0);
float x = w/2;
float y = h/2;
translate(-w/4, 0);
translate(x, y);
rotate(map(mouseX, 0, width, 3*PI, 0));
translate(-x, -y);
image(pimg, 0, 0);
}