code: function(map, logger) {
    if (typeof logger == 'undefined') {
      logger = {};
      logger.log = function() {};
    }
    this.logger = logger;
  
    this.initialized = false;
  
    this.updateFuncs = [];
  
    this._setupWorker();
    
    // Parse map tiles into polygons.
    var polys = MapParser.parse(map);
    if (!polys) {
      throw "Map parsing failed!";
    }
  
    // Track map state.
    this.map = JSON.parse(JSON.stringify(map));
  
    // Initialize navmesh.
    this._init(polys);
  }
docs: A NavMesh represents the traversable area of a map and gives
  utilities for pathfinding.
  Usage:
  ```javascript
  // Assuming the 2d map tiles array is available:
  var navmesh = new NavMesh(map);
  navmesh.calculatePath(currentlocation, targetLocation, callback);
  ```
  @module NavMesh
   
  @constructor
  @alias module:NavMesh
  @param {MapTiles} map - The 2d array defining the map tiles.
  @param {Logger} [logger] - The logger to use.