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
RenderTexture.render now takes a Matrix as its second parameter, not a Point object. This brings it in line with Pixi and allows you to perform much more complex transformations on the object being rendered. If you need to replicate the old behavior please use RenderTexture.renderXY(sprite, point.x, point.y) instead.
RenderTexture.render and `renderXY` would ignore the Sprites rotation or scale. The full Sprite transform is now used correctly when the Sprite is drawn to the texture. If you wish to replicate the old behavior please use `RenderTexture.renderRawXY` instead.
RenderTexture.matrix has been removed as it's no longer used.
Fixed bug in Pixi where RenderTexture.render would ignore the given matrix.
Fixed a bug in Pixi where drawing a Sprite to a RenderTexture would reset the Sprites transform to an identity Matrix.
* This function will draw the display object to the texture.
119
+
* This function will draw the display object to the RenderTexture.
120
+
*
121
+
* In versions of Phaser prior to 2.4.0 the second parameter was a Phaser.Point object.
122
+
* This is now a Matrix allowing you much more control over how the Display Object is rendered.
123
+
* If you need to replicate the earlier behavior please use Phaser.RenderTexture.renderXY instead.
124
+
*
125
+
* If you wish for the displayObject to be rendered taking its current scale, rotation and translation into account then either
126
+
* pass `null`, leave it undefined or pass `displayObject.worldTransform` as the matrix value.
84
127
*
85
128
* @method Phaser.RenderTexture.prototype.render
86
-
* @param {Phaser.Sprite|Phaser.Image|Phaser.Text|Phaser.BitmapText|Phaser.Group} displayObject The display object to render to this texture.
87
-
* @param {Phaser.Point} position - A Point object containing the position to render the display object at.
88
-
* @param {boolean} clear - If true the texture will be cleared before the display object is drawn.
129
+
* @param {Phaser.Sprite|Phaser.Image|Phaser.Text|Phaser.BitmapText|Phaser.Group} displayObject - The display object to render to this texture.
130
+
* @param {Phaser.Matrix} [matrix] - Optional matrix to apply to the display object before rendering. If null or undefined it will use the worldTransform matrix of the given display object.
131
+
* @param {boolean} [clear=false] - If true the texture will be cleared before the display object is drawn.
0 commit comments