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
+32-1Lines changed: 32 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,6 +32,33 @@ The process of managing scissors in the WebGLRenderer has been completely rewrit
32
32
* Cameras have a new internal method `updateSystem` which is automatically called if you change any Camera viewport values. This in turn tells the Scene Manager if there are any cameras with custom viewports, in any Scene of your game. If there are not then the scissor is never even enabled or set, meaning zero gl ops! If your game uses full sized Cameras it now doesn't cost anything at all with regard to scissoring.
33
33
* If a new scissor is set it will now check to see if it's the same size and position as the current scissor, and if so, it'll skip setting it at all.
34
34
35
+
### Render Texture New Features and Updates
36
+
37
+
The Render Texture class has been rewritten from scratch.
38
+
39
+
### Text Game Object New Features and Updates
40
+
41
+
The Text Game Object has been given an internal overhaul to make it more flexible. Some properties have been renamed or moved and new features added:
42
+
43
+
* Text can now be cropped in WebGL and Canvas! Use the `setCrop` method to crop the text.
44
+
* Text now keeps a reference to the renderer in the `renderer` property.
45
+
* The `canvasTexture` property has been removed.
46
+
* Text now has internal `texture` and `frame` properties. These replace the old `canvasTexture` but perform the same task, while allowing for texture cropping and much smaller renderer code.
47
+
48
+
### Tile Sprite Object New Features and Updates
49
+
50
+
The Tile Sprite Game Object has been given an internal overhaul to make it more flexible. Some properties have been renamed or moved and new features added:
51
+
52
+
* Tile Sprites can now be cropped in WebGL and Canvas! Use the `setCrop` method to crop the tile sprite.
53
+
* There is a new method `setTileScale` which will set the tile scale in a chainable call.
54
+
* There is a new internal `canvas` property. Tile Sprites work differently than before in Canvas mode: Previously they would use the `fillRect` command on the game canvas to draw themselves every frame, even if they hadn't changed. They now draw to an internal canvas only when their position or scale changes. This canvas is then drawn to the game canvas instead. It's faster, as it doesn't fillRect every frame and also allows you to draw them to other contexts, such as Render Textures.
55
+
* There are two new internal properties `_tilePosition` and `_tileScale` which are Vector 2s that hold the position and scale. Getters have been added, so use the same properties as before in your code.
56
+
* There are two new properties `displayTexture` and `displayFrame`. These replace the previous `texture` and `frame` properties and hold references to the source texture the Tile Sprite is using.
57
+
* The `canvasPattern` property has been renamed to `fillPattern`.
58
+
* The `oldFrame` property has been removed.
59
+
* The `canvasBuffer` property has been renamed to `fillCanvas`.
60
+
* The `canvasBufferCtx` property has been renamed to `fillContext`.
61
+
35
62
### New Features
36
63
37
64
*`Camera.resolution` is a new read-only property that holds the current game config resolution that the camera is using. This is used internally for viewport calculations.
@@ -57,7 +84,9 @@ The process of managing scissors in the WebGLRenderer has been completely rewrit
57
84
*`TransformMatrix.copyToContext` is a new method that will copy the values from the Matrix to the given Canvas Rendering Context.
58
85
*`Phaser.Utils.String.UUID` will return an RFC4122 complaint UUID as a string. This is used internally to avoid cache key conflicts, but is exposed for your own use as well.
59
86
* There is a new `Crop` Component which is used by non-texture based Game Objects, such as Text and TileSprite. You either use `TextureCrop` or `Crop`, not both together on the same object.
60
-
*
87
+
*`TransformMatrix.setToContext` is a new method that will set the values from the Matrix to the given Canvas Rendering Context using setTransform rather than transform.
88
+
*`SetTransform` is a new Canvas Renderer function that consolidates the process of preparing a Game Object for rendering, without actually rendering it. This is used internally by the Graphics and Bitmap Text classes.
89
+
* The Texture Manager has a new method called `renameTexture` which will let you rename a texture, changing the key to the new one given. All existing Game Objects will still maintain their reference, even after a rename.
61
90
62
91
### Updates
63
92
@@ -86,6 +115,8 @@ The process of managing scissors in the WebGLRenderer has been completely rewrit
86
115
* The `currentAlpha` property has been removed from the Canvas Renderer and is no longer checked by any class. Alpha values are now set directly on the context to avoid state saving invalidation.
87
116
*`TextureCrop` and `Crop` have a new method `resetCropObject` which generates the crop data object required by Game Objects that support cropping. This allows us to remove duplicate code from a number of Game Objects and replace it with a single function call.
88
117
* The Canvas Renderer has a new `batchSprite` method that consolidates the process of drawing a texture-based Game Object to the canvas. It processes the alpha, blend mode and matrix calculations in a single function and now is used by nearly all Game Object canvas renderers.
118
+
* The `batchTexture` method in the Texture Tint Pipeline now supports cropped Game Objects and will adjust the drawn texture frame accordingly.
119
+
* The `Matrix Stack` Component has been removed. It's no longer used internally and was just wasting space.
0 commit comments