function Viewport() {
  
  this.x = 0;
  this.y = 0;
  this.w = 0;
  this.h = 0;
  
  this.sceneX = 0;
  this.sceneY = 0;
  
  
  this.init = function(x, y, w, h) {
    
    this.x = x;
    this.y = y;
    this.w = w;
    this.h = h;
    
  };
  
  
  this.setCamera = function(x, y) {
    this.sceneX = (this.w / 2) - x;
    this.sceneY = (this.h / 2) - y;
  };
  
  
  this.applyTranslation = function() {
    c.save();
    c.translate(Math.round(this.sceneX + this.x), Math.round(this.sceneY + this.y));
  };
  
  
  this.removeTranslation = function() {
    c.restore();
  };
  
}