src/Matter/World.js
function (tilemapLayer, tiles) {
		let i, layerData = tilemapLayer.layer;
		
		// Pre-process the tiles
		for (i in tiles) {
			let tile = tiles[i];
			
			tile.physics.slopes = tile.physics.slopes || {};
			
			tile.physics.slopes = {
				neighbours: {
					up: GetTileAt(tile.x, tile.y - 1, true, layerData),
					down: GetTileAt(tile.x, tile.y + 1, true, layerData),
					left: GetTileAt(tile.x - 1, tile.y, true, layerData),
					right: GetTileAt(tile.x + 1, tile.y, true, layerData),
					topLeft: GetTileAt(tile.x - 1, tile.y - 1, true, layerData),
					topRight: GetTileAt(tile.x + 1, tile.y - 1, true, layerData),
					bottomLeft: GetTileAt(tile.x - 1, tile.y + 1, true, layerData),
					bottomRight: GetTileAt(tile.x + 1, tile.y + 1, true, layerData),
				},
				edges: {
					top: Constants.INTERESTING,
					bottom: Constants.INTERESTING,
					left: Constants.INTERESTING,
					right: Constants.INTERESTING
				}
			};
		}
		
		// Calculate boundary edges
		this.calculateBoundaryEdges(tiles);
		
		// Flag internal edges
		this.flagInternalEdges(tiles);
		
		// Build ghost edges and flag ignormals
		this.flagIgnormals(tiles);
	}
function (tilemapLayer, tiles) {
		let i, layerData = tilemapLayer.layer;
		
		// Pre-process the tiles
		for (i in tiles) {
			let tile = tiles[i];
			
			tile.physics.slopes = tile.physics.slopes || {};
			
			tile.physics.slopes = {
				neighbours: {
					up: GetTileAt(tile.x, tile.y - 1, true, layerData),
					down: GetTileAt(tile.x, tile.y + 1, true, layerData),
					left: GetTileAt(tile.x - 1, tile.y, true, layerData),
					right: GetTileAt(tile.x + 1, tile.y, true, layerData),
					topLeft: GetTileAt(tile.x - 1, tile.y - 1, true, layerData),
					topRight: GetTileAt(tile.x + 1, tile.y - 1, true, layerData),
					bottomLeft: GetTileAt(tile.x - 1, tile.y + 1, true, layerData),
					bottomRight: GetTileAt(tile.x + 1, tile.y + 1, true, layerData),
				},
				edges: {
					top: Constants.INTERESTING,
					bottom: Constants.INTERESTING,
					left: Constants.INTERESTING,
					right: Constants.INTERESTING
				}
			};
		}
		
		// Calculate boundary edges
		this.calculateBoundaryEdges(tiles);
		
		// Flag internal edges
		this.flagInternalEdges(tiles);
		
		// Build ghost edges and flag ignormals
		this.flagIgnormals(tiles);
	}
function ( tilemapLayer , tiles ) { let i , layerData = tilemapLayer . layer ; // Pre-process the tiles for ( i in tiles ) { let tile = tiles [ i ] ; tile . physics . slopes = tile . physics . slopes || { } ; tile . physics . slopes = { neighbours : { up : GetTileAt ( tile . x , tile . y - 1 , true , layerData ) , down : GetTileAt ( tile . x , tile . y + 1 , true , layerData ) , left : GetTileAt ( tile . x - 1 , tile . y , true , layerData ) , right : GetTileAt ( tile . x + 1 , tile . y , true , layerData ) , topLeft : GetTileAt ( tile . x - 1 , tile . y - 1 , true , layerData ) , topRight : GetTileAt ( tile . x + 1 , tile . y - 1 , true , layerData ) , bottomLeft : GetTileAt ( tile . x - 1 , tile . y + 1 , true , layerData ) , bottomRight : GetTileAt ( tile . x + 1 , tile . y + 1 , true , layerData ) , } , edges : { top : Constants . INTERESTING , bottom : Constants . INTERESTING , left : Constants . INTERESTING , right : Constants . INTERESTING } } ; } // Calculate boundary edges this . calculateBoundaryEdges ( tiles ) ; // Flag internal edges this . flagInternalEdges ( tiles ) ; // Build ghost edges and flag ignormals this . flagIgnormals ( tiles ) ; }
Process the edges of the given tiles.

@param {Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer} tilemapLayer - The layer the tiles belong to.
@param {Phaser.Tilemaps.Tile[]} tiles - The tiles to process.
Process the edges of the given tiles .