Skip to content

Commit 0042124

Browse files
committed
Lots of resolution removal changes. Fix phaserjs#4417
1 parent b733dbc commit 0042124

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

CHANGELOG-v3.50.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,28 @@ The Animation API has had a significant overhaul to improve playback handling. I
482482
* The `Phaser.Tilemaps.Parsers.Tiled` function has now been exposed on the Phaser namespace (thanks @samme)
483483
* 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.
484484

485+
### Removal of 'Resolution' property from across the API
486+
487+
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.
488+
489+
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:
490+
491+
* The `Phaser.Scale.Events#RESIZE` event no longer sends the `resolution` as a parameter.
492+
* The `BaseCamera.resolution` property has been removed.
493+
* The internal private `BaseCamera._cx`, `_cy`, `_cw` and `_ch` properties has been removed.
494+
* The `BaseCamera.preRender` method no longer receives or uses the `resolution` parameter.
495+
* The `Camera.preRender` method no longer receives or uses the `resolution` parameter.
496+
* The `CameraManager.onResize` method no longer receives or uses the `resolution` parameter.
497+
* The `Core.Config.resolution` property has been removed.
498+
* 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.
499+
* The `CanvasRenderer` no longer reads or uses the Game Config resolution property.
500+
* The `PipelineManager.resize` method along with `WebGLPipeline.resize` and anything else that extends them no longer receives or uses the `resolution` parameter.
501+
* The `WebGLRenderer.resize` and `onResize` methods no longer receives or uses the `resolution` parameter.
502+
* The `ScaleManager.resolution` property has been removed and all internal use of it.
503+
504+
505+
506+
485507
### Examples, Documentation and TypeScript
486508

487509
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)