> show canvas only <


/* built with Studio Sketchpad: 
 *   https://sketchpad.cc
 * 
 * observe the evolution of this sketch: 
 *   https://studio.sketchpad.cc/sp/pad/view/ro.XK4VXx03vLK/rev.621
 * 
 * authors: 
 *   Steve Mickelson
 *   Gregg Blanchard

 * license (unless otherwise specified): 
 *   creative commons attribution-share alike 3.0 license.
 *   https://creativecommons.org/licenses/by-sa/3.0/ 
 */ 




PImage background;
PImage ship;
PImage logo;

var shipx;
var shipy;
var zoom;


void setup() {
    size (800, 600);
    shipx = width/2;
    shipy = height/2;
    zoom = .5;

}

  background = loadImage("http://lh5.ggpht.com/_NKilDzWxzqU/TKOXyfEgtNI/AAAAAAAAAA4/uu0u7DcMAgc/s800/space%20background.jpg");
  

 ship = loadImage("http://lh3.ggpht.com/_NKilDzWxzqU/TKOchwkA7oI/AAAAAAAAABI/LQIrjn7sV8Q/spaceship.png");
 



void draw() {

  var shipwidth = zoom * 550;
  var shipheight = zoom * 225;


  image(background, 0, 0, 800, 600);
  image(ship, shipx - shipwidth/2, shipy - shipheight/2, shipwidth, shipheight);

}


void mouseDragged() 

{
    shipx = mouseX;
    shipy = mouseY;
    zoom = mouseY  /  height/1.0;

}