draw (cameraX, cameraY) {
    this.selectedTile = this.menuController.stateValue('selectedTile')
    this.highlighter.selectedTile = this.selectedTile
    if (this.selectedTile !== undefined && this.selectedTile !== null) {
      this.highlighter.calculateHighlights(this.selectedTile)
    }

    for (var layer of this.layers.values()) {
      layer.texture.clear()
      layer.renderS.reset(cameraX, cameraY)
    }      

    var viewArea = this.viewAreaLimits(cameraX, cameraY)
    var offset = this.offset(cameraX, cameraY, viewArea.startCol, viewArea.startRow)
    this.fillView(viewArea, offset)
  }
/**
   * Draws the map display area of the game screen
   * Called on every frame update, clears the current RenderTextures
   * and fills them up again with ViewTiles
   * 
   * @param {number} cameraX
   * @param {number} cameraY
   */
Draws the map display area of the game screen
Called on every frame update, clears the current RenderTextures
and fills them up again with ViewTiles

@param {number} cameraX
@param {number} cameraY
Draws the map display area of the game screen Called on every frame update clears the current RenderTextures and fills them up again with ViewTiles @param { number } cameraX @param { number } cameraY
draw (cameraX, cameraY) {
    this.selectedTile = this.menuController.stateValue('selectedTile')
    this.highlighter.selectedTile = this.selectedTile
    if (this.selectedTile !== undefined && this.selectedTile !== null) {
      this.highlighter.calculateHighlights(this.selectedTile)
    }
    for (var layer of this.layers.values()) {
      layer.texture.clear()
      layer.renderS.reset(cameraX, cameraY)
    }      
    var viewArea = this.viewAreaLimits(cameraX, cameraY)
    var offset = this.offset(cameraX, cameraY, viewArea.startCol, viewArea.startRow)
    this.fillView(viewArea, offset)
  }
draw ( cameraX , cameraY ) { this . selectedTile = this . menuController . stateValue ( 'selectedTile' ) this . highlighter . selectedTile = this . selectedTile if ( this . selectedTile !== undefined && this . selectedTile !== null ) { this . highlighter . calculateHighlights ( this . selectedTile ) } for ( var layer of this . layers . values ( ) ) { layer . texture . clear ( ) layer . renderS . reset ( cameraX , cameraY ) } var viewArea = this . viewAreaLimits ( cameraX , cameraY ) var offset = this . offset ( cameraX , cameraY , viewArea . startCol , viewArea . startRow ) this . fillView ( viewArea , offset ) }
Draws the map display area of the game screen
 Called on every frame update, clears the current RenderTextures
 and fills them up again with ViewTiles
Draws the map display area of the game screen Called on every frame update clears the current RenderTextures and fills them up again with ViewTiles