code: function (targ, time) {
              var x = targ.x,
                      y = targ.y,
                      mid_x = targ.w / 2,
                      mid_y = targ.h / 2,
                      cent_x = Crafty.viewport.width / 2,
                      cent_y = Crafty.viewport.height / 2,
                      new_x = x + mid_x - cent_x,
                      new_y = y + mid_y - cent_y;
  
              Crafty.viewport.pan('reset');
              Crafty.viewport.pan('x', new_x, time);
              Crafty.viewport.pan('y', new_y, time);
          }
docs: @
  #Crafty.viewport.centerOn
  @comp Crafty.viewport
  @sign public void Crafty.viewport.centerOn(Object target, Number time)
  @param Object target - An entity with the 2D component
  @param Number time - The number of frames to perform the centering over
  
  Centers the viewport on the given entity