function Camera() {

    function _print() {
        console.log(x, y);
    }

    function _move(_x, _y) {
        x += _x;
        y += _y;
    }

    function getWidth() {
        return width;
    }

    function getHeight() {
        return height;
    }

    var x = 0;
    var y = 0;
    var width = gfx.width;
    var height = gfx.height;
    // var that = this;

    this.print = function() {
        return _print();
    }

    this.move = function(x, y) {
        return _move(x, y);
    }

    this.getWidth = function() {
        return getWidth();
    }

    this.getHeight = function() {
        return getHeight();
    }
}

@@ -250,24 +250,355 @@
 ght;%0A    %7D%0A%0A
+    function zoom(factor) %7B%0A        zoomLevel += factor;%0A    %7D%0A%0A    function zoomIn() %7B%0A        zoom(10);%0A    %7D%0A%0A    function zoomOut() %7B%0A        zoom(-10);%0A    %7D%0A%0A    function transformToCameraSpace(w_x, w_y) %7B%0A        return %7B%0A            cam_x : (w_x * zoomLevel) - x,%0A            cam_y : (w_y * zoomLevel) - y%0A        %7D%0A    %7D%0A%0A
     var x = 
@@ -596,24 +596,24 @@
  var x = 0;%0A
-
     var y = 
@@ -667,24 +667,49 @@
 gfx.height;%0A
+    var zoomLevel = 100;%0A
     // var t
@@ -944,32 +944,32 @@
  = function() %7B%0A
-
         return g
@@ -985,11 +985,250 @@
 );%0A    %7D
+%0A%0A    this.zoomIn = function() %7B%0A        return zoomIn();%0A    %7D%0A%0A    this.zoomOut = function() %7B%0A        return zoomOut();%0A    %7D%0A%0A    this.transformToCameraSpace = function(w_x, w_y) %7B%0A        return transformToCameraSpace(w_x, w_y);%0A    %7D
 %0A%7D%0A

Modify camera to allow zooming and better rendering