You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -66,6 +66,7 @@ Notes:
66
66
*`GameObjects.Components.PathFollower` is a new component that manages any type of Game Object following a path. The original Path Follower Game Object has been updated to use this new component directly, but it can be applied to any custom Game Object class.
67
67
*`Tilemap.removeLayer` is a new method that allows you to remove a specific layer from a Tilemap without destroying it.
68
68
*`Tilemap.destroyLayer` is a new method that allows you to destroy a layer and remove it from a Tilemap.
69
+
*`Tilemap.renderDebugFull` is a new method that will debug render all layers in the Tilemap to the given Graphics object.
Copy file name to clipboardExpand all lines: src/tilemaps/Tilemap.js
+29Lines changed: 29 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1764,6 +1764,35 @@ var Tilemap = new Class({
1764
1764
returnthis;
1765
1765
},
1766
1766
1767
+
/**
1768
+
* Draws a debug representation of all layers within this Tilemap to the given Graphics object.
1769
+
*
1770
+
* This is helpful when you want to get a quick idea of which of your tiles are colliding and which
1771
+
* have interesting faces. The tiles are drawn starting at (0, 0) in the Graphics, allowing you to
1772
+
* place the debug representation wherever you want on the screen.
1773
+
*
1774
+
* @method Phaser.Tilemaps.Tilemap#renderDebugFull
1775
+
* @since 3.17.0
1776
+
*
1777
+
* @param {Phaser.GameObjects.Graphics} graphics - The target Graphics object to draw upon.
1778
+
* @param {Phaser.Tilemaps.Types.StyleConfig} styleConfig - An object specifying the colors to use for the debug drawing.
1779
+
* @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.
1780
+
*
1781
+
* @return {?Phaser.Tilemaps.Tilemap} Return this Tilemap object, or null if the layer given was invalid.
1782
+
*/
1783
+
renderDebugFull: function(graphics,styleConfig)
1784
+
{
1785
+
varlayers=this.layers;
1786
+
1787
+
// Destroy any StaticTilemapLayers or DynamicTilemapLayers that are stored in LayerData
0 commit comments