phaser - v4.0.0-rc.4
    Preparing search index...
    • For each tile in the given rectangular area (in tile coordinates) of the layer, run the given filter callback function. Any tiles that pass the filter test (i.e. where the callback returns true) will returned as a new array. Similar to Array.prototype.Filter in vanilla JS.

      Parameters

      • callback: Function

        The callback. Each tile in the given area will be passed to this callback as the first and only parameter. The callback should return true for tiles that pass the filter.

      • context: object

        The context under which the callback should be run.

      • tileX: number

        The left most tile index (in tile coordinates) to use as the origin of the area to filter.

      • tileY: number

        The top most tile index (in tile coordinates) to use as the origin of the area to filter.

      • width: number

        How many tiles wide from the tileX index the area will be.

      • height: number

        How many tiles tall from the tileY index the area will be.

      • filteringOptions: FilteringOptions

        Optional filters to apply when getting the tiles.

      • layer: LayerData

        The Tilemap Layer to act upon.

      Returns Tile[]