code: function(pixel1, pixel2, tolerance) {
          var passes = true;
  
          if (tolerance != null && pixel1 && pixel2) {
              var dist = pixel1.distanceTo(pixel2);
              if (dist > tolerance) {
                  passes = false;
              }
          }
          return passes;
      }
docs: Method: passesTolerance
  Determine whether the event is within the optional pixel tolerance.
  
  Returns:
  {Boolean} The event is within the pixel tolerance (if specified).