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
* Settings that control standard (non-diagnostic) rendering.
74
75
*
75
-
* @property {boolean} [enableScrollDelta=true] - Delta scroll rendering only draws tiles/edges as they come into view.
76
-
* This can greatly improve scrolling rendering performance, especially when there are many small tiles.
77
-
* It should only be disabled in rare cases.
78
-
*
79
-
* @property {?DOMCanvasElement} [copyCanvas=(auto)] - [Internal] If set, force using a separate (shared) copy canvas.
80
-
* Using a canvas bitblt/copy when the source and destinations region overlap produces unexpected behavior
81
-
* in some browsers, notably Safari.
76
+
* @property {float} [overdrawRatio=0.20] - Over Draw ratio.
82
77
*
83
78
* @default
84
79
*/
85
80
this.renderSettings={
86
-
enableScrollDelta: false,
87
-
overdrawRatio: 0.20,
88
-
copyCanvas: null
81
+
overdrawRatio: 0.20
89
82
};
90
83
91
-
/**
92
-
* Enable an additional "debug rendering" pass to display collision information.
93
-
*
94
-
* @property {boolean} debug
95
-
* @default
96
-
*/
97
-
this.debug=false;
98
-
99
84
/**
100
85
* @property {boolean} exists - Controls if the core game loop and physics update this game object or not.
101
86
*/
102
87
this.exists=true;
103
88
104
-
/**
105
-
* Settings used for debugging and diagnostics.
106
-
*
107
-
* @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._
108
-
*
109
-
* @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._
110
-
*
111
-
* @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.
112
-
*
113
-
* @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.
114
-
*
115
-
* @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.
116
-
*
117
-
* @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.
118
-
*
119
-
*/
120
-
this.debugSettings={
121
-
122
-
missingImageFill: 'rgb(255,255,255)',
123
-
debuggedTileOverfill: 'rgba(0,255,0,0.4)',
124
-
125
-
forceFullRedraw: true,
126
-
127
-
debugAlpha: 0.5,
128
-
facingEdgeStroke: 'rgba(0,255,0,1)',
129
-
collidingTileOverfill: 'rgba(0,255,0,0.2)'
130
-
131
-
};
132
-
133
89
/**
134
90
* 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).
0 commit comments