Skip to content

Commit b9d34ca

Browse files
committed
Added debug object back in.
1 parent d982003 commit b9d34ca

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

src/tilemap/TilemapLayerGL.js

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,35 @@ Phaser.TilemapLayerGL = function (game, tilemap, index, width, height) {
8686
*/
8787
this.exists = true;
8888

89+
/**
90+
* Settings used for debugging and diagnostics.
91+
*
92+
* @property {?string} missingImageFill - A tile is rendered as a rectangle using the following fill if a valid tileset/image cannot be found. A value of `null` prevents additional rendering for tiles without a valid tileset image. _This takes effect even when debug rendering for the layer is not enabled._
93+
*
94+
* @property {?string} debuggedTileOverfill - If a Tile has `Tile#debug` true then, after normal tile image rendering, a rectangle with the following fill is drawn above/over it. _This takes effect even when debug rendering for the layer is not enabled._
95+
*
96+
* @property {boolean} forceFullRedraw - When debug rendering (`debug` is true), and this option is enabled, the a full redraw is forced and rendering optimization is suppressed.
97+
*
98+
* @property {number} debugAlpha - When debug rendering (`debug` is true), the tileset is initially rendered with this alpha level. This can make the tile edges clearer.
99+
*
100+
* @property {?string} facingEdgeStroke - When debug rendering (`debug` is true), this color/stroke is used to draw "face" edges. A value of `null` disables coloring facing edges.
101+
*
102+
* @property {?string} collidingTileOverfill - When debug rendering (`debug` is true), this fill is used for tiles that are collidable. A value of `null` disables applying the additional overfill.
103+
*
104+
*/
105+
this.debugSettings = {
106+
107+
missingImageFill: 'rgb(255,255,255)',
108+
debuggedTileOverfill: 'rgba(0,255,0,0.4)',
109+
110+
forceFullRedraw: true,
111+
112+
debugAlpha: 0.5,
113+
facingEdgeStroke: 'rgba(0,255,0,1)',
114+
collidingTileOverfill: 'rgba(0,255,0,0.2)'
115+
116+
};
117+
89118
/**
90119
* Speed at which this layer scrolls horizontally, relative to the camera (e.g. scrollFactorX of 0.5 scrolls half as quickly as the 'normal' camera-locked layers do).
91120
* @property {number} scrollFactorX

0 commit comments

Comments
 (0)