Skip to content

Commit 8ff1c7c

Browse files
committed
Update CHANGELOG-v3.50.md
1 parent d8a8aa8 commit 8ff1c7c

1 file changed

Lines changed: 33 additions & 30 deletions

File tree

CHANGELOG-v3.50.md

Lines changed: 33 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ Other pipeline changes are as follows:
2828
* All pipelines will now extract the `vertexData` property from the config, allowing you to set it externally.
2929
* All pipelines will now extract the `attributes` property from the config, allowing you to set it externally.
3030
* All pipelines will now extract the `topology` property from the config, allowing you to set it externally.
31+
* The `WebGLPipeline.shouldFlush` method now accepts an optional parameter `amount`. If given, it will return `true` if when the amount is added to the vertex count it will exceed the vertex capacity. The Multi Pipeline has been updated to now use this method instead of performing the comparison multiple times itself.
3132

3233
### Pipeline Manager
3334

@@ -178,11 +179,7 @@ If you used any of them in your code, please update to the new function names be
178179
* `projOrtho` is now available as a stand-alone function `Phaser.Renderer.WebGL.MVP.ProjectOrtho`
179180
* `Phaser.Renderer.WebGL.MVP.SetIdentity` is a new function the others use, to save on space.
180181

181-
### Removed 'interpolationPercentage' parameter from all render functions
182-
183-
Since v3.0.0 the Game Object `render` functions have received a parameter called `interpolationPercentage` that was never used. The renderers do not calculate this value and no Game Objects apply it, so for the sake of clairty, reducing code and removing complexity from the API it has been removed from every single function that either sent or expected the parameter. This touches every single Game Object and changes the parameter order as a result, so please be aware of this if you have your own custom Game Objects that implement their own render methods.
184-
185-
### BitmapText New Features, Updates and API Changes
182+
### BitmapText - New Features, Updates and API Changes
186183

187184
* `BitmapText.setCharacterTint` is a new method that allows you to set a tint color (either additive or fill) on a specific range of characters within a static Bitmap Text. You can specify the start and length offsets and per-corner tint colors.
188185
* `BitmapText.setWordTint` is a new method that allows you to set a tint color (either additive or fill) on all matching words within a static Bitmap Text. You can specify the word by string, or numeric offset, and the number of replacements to tint.
@@ -249,7 +246,7 @@ The way in which Game Objects add themselves to the Scene Update List has change
249246
* The Spine Plugin `destroy` method will now no longer remove the Game Objects from the Game Object Factory, or dispose of the Scene Renderer. This means when a Scene is destroyed, it will keep the Game Objects in the factory for other Scene's to use. Fix #5279 (thanks @Racoonacoon)
250247
* `SpinePlugin.gameDestroy` is a new method that is called if the Game instance emits a `destroy` event. It removes the Spine Game Objects from the factory and disposes of the Spine scene renderer.
251248

252-
### Animation API New Features and Updates
249+
### Animation API - New Features and Updates
253250

254251
If you use Animations in your game, please read the following important API changes in 3.50:
255252

@@ -352,18 +349,20 @@ The Animation API has had a significant overhaul to improve playback handling. I
352349
* `GenerateFrameNumbers` can now accept the `start` and `end` parameters in reverse order, meaning you can now do `{ start: 10, end: 1 }` to create the animation in reverse.
353350
* `GenerateFrameNames` can now accept the `start` and `end` parameters in reverse order, meaning you can now do `{ start: 10, end: 1 }` to create the animation in reverse.
354351

355-
### Mesh Game Object New Features and Updates
352+
### Mesh Game Object - New Features, Updates and API Changes
356353

357354
The Mesh Game Object has been rewritten in v3.50 with a lot of internal changes to make it more useful:
358355

359356
* `GameObject.Vertex` is a new micro class that encapsulates all of the data required for a single vertex, such as position, uv, color and alpha. This class is now created internally by the Mesh Game Object.
360357
* `GameObject.Face` is a new micro class that consists of references to the three `Vertex` instances that construct the single Face.
361358
* `Mesh.vertices` is now an array of `GameObject.Vertex` instances, not a Float32Array.
362-
* `Mesh.faces` is a new array of `GameObject.Face` instances, which is populated during a call to `setVertices`.
363-
* `Mesh.setVertices` is a new method that allows you to set the verts of a Mesh Game Object from the given parameters. This allows you to modify a mesh post-creation, or populate it with data at a later stage.
359+
* `Mesh.faces` is a new array of `GameObject.Face` instances, which is populated during a call to `addVertices`.
360+
* `Mesh.addVertices` is a new method that allows you to add vertices to a Mesh Game Object based on the given parameters. This allows you to modify a mesh post-creation, or populate it with data at a later stage.
361+
* `Mesh.clearVertices` is a new method that will destroy all Faces and Vertices and clear the Mesh.
362+
* The Mesh now renders by iterating through the Faces array, not the vertices. This allows you to use Array methods such as `BringToTop` to reposition a Face, thus changing the drawing order without having to repopulate all of the vertices.
364363
* The Mesh constructor signature has changed to `scene, x, y, vertices, uvs, indicies, colors, alphas, texture, frame`, where `indicies` is the new parameter added to the list. It allows you to provide indexed vertex data to create the Mesh from, where the `indicies` array holds the vertex index information. The final list of vertices is built from this index along with the provided vertices and uvs arrays.
365-
* You can now supply just a single numerical value as the `color` parameter in the constructor, factory method and `setVertices` method. If a number, instead of an array, it will be used as the color for all vertices created.
366-
* You can now supply just a single numerical value as the `alpha` parameter in the constructor, factory method and `setVertices` method. If a number, instead of an array, it will be used as the alpha for all vertices created.
364+
* You can now supply just a single numerical value as the `color` parameter in the constructor, factory method and `addVertices` method. If a number, instead of an array, it will be used as the color for all vertices created.
365+
* You can now supply just a single numerical value as the `alpha` parameter in the constructor, factory method and `addVertices` method. If a number, instead of an array, it will be used as the alpha for all vertices created.
367366
* The `Mesh` Game Object now extends the `SingleAlpha` component and the alpha value is factored into the final alpha value per vertex during rendering. This means you can now set the whole alpha across the Mesh using the standard `setAlpha` methods. But, if you wish to, you can still control the alpha on a per-vertex basis as well.
368367
* The `Mesh` Game Object now has the Animation State Component. This allows you to create and play animations across the texture of a Mesh, something that previously wasn't possible. As a result, the Mesh now adds itself to the Update List when added to a Scene.
369368
* `Mesh.setDebug` is a new method that allows you to render a debug visualisation of the Mesh vertices to a Graphics Game Object. You can provide your own Graphics instance and optionally callback that is invoked during rendering. This allows you to easily visualise the vertices of your Mesh to help debug UV mapping.
@@ -414,6 +413,29 @@ This has all changed in 3.50, as outlined below. Tint values are now used direct
414413
* The `TextureManager` now generates a new texture with the key `__WHITE` durings its boot process. This is a pure white 4x4 texture used by the Graphics pipelines.
415414
* `Config.images.white` is a new Game Config property that specifies the 4x4 white PNG texture used by Graphics rendering. You can override this via the config, but only do so if needed.
416415

416+
### Removal of 'resolution' property from across the API
417+
418+
For legacy reasons, Phaser 3 has never properly supported HighDPI devices. It will render happily to them of course, but wouldn't let you set a 'resolution' for the Canvas beyond 1. Earlier versions of 3.x had a resolution property in the Game Config, but it was never fully implemented (for example, it would break zooming cameras). When the Scale Manager was introduced in v3.16 we forced the resolution to be 1 to avoid it breaking anything else internally.
419+
420+
For a long time, the 'resolution' property has been present - taunting developers and confusing new comers. In this release we have finally gone through and removed all references to it. The Game Config option is now gone, it's removed from the Scale Manager, Base Camera and everywhere else where it matters. As much as we would have liked to implement the feature, we've spent too long without it, and things have been built around the assumption it isn't present. The API just wouldn't cope with having it shoe-horned in at this stage. As frustrating as this is, it's even more annoying to just leave the property there confusing people and wasting CPU cycles. Phaser 4 has been built with HighDPI screens in mind from the very start, but it's too late for v3. The following changes are a result of this removal:
421+
422+
* The `Phaser.Scale.Events#RESIZE` event no longer sends the `resolution` as a parameter.
423+
* The `BaseCamera.resolution` property has been removed.
424+
* The internal private `BaseCamera._cx`, `_cy`, `_cw` and `_ch` properties has been removed.
425+
* The `BaseCamera.preRender` method no longer receives or uses the `resolution` parameter.
426+
* The `Camera.preRender` method no longer receives or uses the `resolution` parameter.
427+
* The `CameraManager.onResize` method no longer receives or uses the `resolution` parameter.
428+
* The `Core.Config.resolution` property has been removed.
429+
* The `TextStyle.resolution` property is no longer read from the Game Config. You can still set it via the Text Style config to a value other than 1, but it will default to this now.
430+
* The `CanvasRenderer` no longer reads or uses the Game Config resolution property.
431+
* The `PipelineManager.resize` method along with `WebGLPipeline.resize` and anything else that extends them no longer receives or uses the `resolution` parameter.
432+
* The `WebGLRenderer.resize` and `onResize` methods no longer receives or uses the `resolution` parameter.
433+
* The `ScaleManager.resolution` property has been removed and all internal use of it.
434+
435+
### Removed 'interpolationPercentage' parameter from all render functions
436+
437+
Since v3.0.0 the Game Object `render` functions have received a parameter called `interpolationPercentage` that was never used. The renderers do not calculate this value and no Game Objects apply it, so for the sake of clairty, reducing code and removing complexity from the API it has been removed from every single function that either sent or expected the parameter. This touches every single Game Object and changes the parameter order as a result, so please be aware of this if you have your own _custom_ Game Objects that implement their own `render` methods. In terms of surface API changes, you shouldn't notice anything at all from this removal.
438+
417439
### New Features
418440

419441
* `Geom.Intersects.GetLineToLine` is a new function that will return a Vector3 containing the point of intersection between 2 line segments, with the `z` property holding the distance value.
@@ -535,25 +557,6 @@ This has all changed in 3.50, as outlined below. Tint values are now used direct
535557
* The `Phaser.Tilemaps.Parsers.Tiled` function has now been exposed on the Phaser namespace (thanks @samme)
536558
* Every single `Tilemap.Component` function has now been made public. This means you can call the Component functions directly, should you need to, outside of the Tilemap system.
537559

538-
### Removal of 'Resolution' property from across the API
539-
540-
For legacy reasons, Phaser 3 has never properly supported HighDPI devices. It will render happily to them of course, but wouldn't let you set a 'resolution' for the Canvas beyond 1. Earlier versions of 3.x had a resolution property in the Game Config, but it was never fully implemented (for example, it would break zooming cameras). When the Scale Manager was introduced in v3.16 we forced the resolution to be 1 to avoid it breaking anything else internally.
541-
542-
For a long time, the 'resolution' property has been present - taunting developers and confusing new comers. In this release we have finally gone through and removed all references to it. The Game Config option is now gone, it's removed from the Scale Manager, Base Camera and everywhere else where it matters. As much as we would have liked to implement the feature, we've spent too long without and things have been built around the assumption it isn't present that just wouldn't cope with having it shoe-horned in at this stage. As frustrating as this is, it's even more annoying to just leave the property there confusing people and wasting CPU cycles. Phaser 4 has been built with HighDPI screens in mind from the very start, but it's just too late for v3. The following changes are a result of this removal:
543-
544-
* The `Phaser.Scale.Events#RESIZE` event no longer sends the `resolution` as a parameter.
545-
* The `BaseCamera.resolution` property has been removed.
546-
* The internal private `BaseCamera._cx`, `_cy`, `_cw` and `_ch` properties has been removed.
547-
* The `BaseCamera.preRender` method no longer receives or uses the `resolution` parameter.
548-
* The `Camera.preRender` method no longer receives or uses the `resolution` parameter.
549-
* The `CameraManager.onResize` method no longer receives or uses the `resolution` parameter.
550-
* The `Core.Config.resolution` property has been removed.
551-
* The `TextStyle.resolution` property is no longer read from the Game Config. You can still set it via the Text Style config to a value other than 1, but it will default to this now.
552-
* The `CanvasRenderer` no longer reads or uses the Game Config resolution property.
553-
* The `PipelineManager.resize` method along with `WebGLPipeline.resize` and anything else that extends them no longer receives or uses the `resolution` parameter.
554-
* The `WebGLRenderer.resize` and `onResize` methods no longer receives or uses the `resolution` parameter.
555-
* The `ScaleManager.resolution` property has been removed and all internal use of it.
556-
557560
### Examples, Documentation and TypeScript
558561

559562
My thanks to the following for helping with the Phaser 3 Examples, Docs, and TypeScript definitions, either by reporting errors, fixing them, or helping author the docs:

0 commit comments

Comments
 (0)