Commit graph

15010 commits

Author SHA1 Message Date
Richard Davey
4795c56d79 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. 2020-09-14 14:57:08 +01:00
Richard Davey
e368c479a0 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. 2020-09-14 14:54:58 +01:00
Richard Davey
81800e0ce2 WebGLRenderer.whiteTexture is a new property that is a reference to a pure white 4x4 texture that is created during Boot by the Texture Manager. The Multi Pipeline uses this internally for all Graphic, Shape and fill rendering. 2020-09-14 14:44:29 +01:00
Richard Davey
81b63cdf20 The Rope.tintFill property is now a boolean, not an integer, and can no longer take 2 as a value for a complete fill. Instead, you should provide a solid color texture with no alpha. 2020-09-14 11:12:41 +01:00
Richard Davey
f7fb186047 Update CHANGELOG-v3.50.md 2020-09-14 11:06:20 +01:00
Richard Davey
e5ce83aebd New direct tint value 2020-09-14 11:06:16 +01:00
Richard Davey
0f6cc79cd1 The function GetColorFromValue has been removed as it's no longer used internally. 2020-09-14 11:05:32 +01:00
Richard Davey
4ade25fc79 No longer read private values for tint
The `Multi Pipeline`, `Bitmap Text`, `Render Texture`, `Text`, `TileSprite` and `Camera` now all read the tint values from the public properties instead of the private `_tintTL` etc ones. They also now set the `tintEffect` value directly from the `tintFill` property, removing another conditional check.
2020-09-14 11:05:09 +01:00
Richard Davey
75c5f11aee Updated shader source RGB to BGR and removed if-else block
* The `Single.frag`, `Light.frag` and `Multi.frag` shaders have all been updated so they now read the color value as `outTint.bgr` instead of `outTint.rgb`. This allows the colors to remain in RGB order within the Tint component.
* The `Single.frag`, `Light.frag` and `Multi.frag` shaders have all been updated so they no longer have a 3-way check on the `outTintEffect` value.
2020-09-14 11:02:02 +01:00
Richard Davey
6d09f1fe40 Refactored Tint component
* `Tint.tintTopLeft` is now a normal property in RGB order, not a setter, and no longer passes through the `GetColorFromValue` function. This directly replaces the private property `_tintTL` which has now been removed.
* `Tint.tintTopRight` is now a normal property in RGB order, not a setter, and no longer passes through the `GetColorFromValue` function. This directly replaces the private property `_tintTR` which has now been removed.
* `Tint.tintBottomLeft` is now a normal property in RGB order, not a setter, and no longer passes through the `GetColorFromValue` function. This directly replaces the private property `_tintBL` which has now been removed.
* `Tint.tintBottomRight` is now a normal property in RGB order, not a setter, and no longer passes through the `GetColorFromValue` function. This directly replaces the private property `_tintBR` which has now been removed.
* The property `Tint._isTinted` has been removed as it's no longer required.
2020-09-14 10:59:32 +01:00
Richard Davey
ea0abc4f69 Tidy up the formatting 2020-09-14 09:44:17 +01:00
Richard Davey
b7eb869d8c Update CHANGELOG-v3.50.md 2020-09-14 09:24:02 +01:00
Richard Davey
17ed707acb The Loader.path was being added to the File URL even if the URL was absolute. This is now checked for and the path is not applied unless the URL is relative #5301 2020-09-14 09:23:59 +01:00
Richard Davey
ae067861f6 Update CHANGELOG-v3.50.md 2020-09-13 23:11:06 +01:00
Richard Davey
25b5c2d1d1 Loads of new Mesh updates
* `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.
* 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.
* 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.
* 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.
* 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.
* 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.
* `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.
* `Mesh.debugGraphic` is a new property that holds the debug Graphics instance reference.
* `Mesh.debugCallback` is a new property that holds the debug render callback.
* `Mesh.renderDebugVerts` is a new method that acts as the default render callback for `setDebug` if none is provided.
* `Mesh.preDestroy` is a new method that will clean-up the Mesh arrays and debug references on destruction.
2020-09-13 23:11:04 +01:00
Richard Davey
3fd52ecdd3 Added debug draw 2020-09-13 17:16:17 +01:00
Richard Davey
c76b084f2e Merge branch 'master' of https://github.com/photonstorm/phaser 2020-09-13 15:17:13 +01:00
Richard Davey
1ba5be5476 Update CHANGELOG-v3.50.md 2020-09-13 15:17:09 +01:00
Richard Davey
cd0a27acfa Fix #5308 2020-09-13 15:17:07 +01:00
Richard Davey
f238efbb96
Merge pull request #5306 from rexrainbow/bugfix-add.existing
Fix add.existing bug
2020-09-13 15:14:19 +01:00
Rex
0cb806c11e Fix add.existing bug
Add game object to updateList if it dose not add to displayList.
( Group game object dose not have `renderCanvas` or `renderWebGL` method)
2020-09-13 17:05:55 +08:00
Richard Davey
00421243e2 Lots of resolution removal changes. Fix #4417 2020-09-12 12:00:18 +01:00
Richard Davey
b733dbcbe1 The ScaleManager.resolution property has been removed and all internal use of it. 2020-09-12 11:59:30 +01:00
Richard Davey
68946f3894 The Phaser.Scale.Events#RESIZE event no longer sends the resolution as a parameter. 2020-09-12 11:58:50 +01:00
Richard Davey
e4b1093e72 The WebGLRenderer.resize and onResize methods no longer receives or uses the resolution parameter. 2020-09-12 11:58:08 +01:00
Richard Davey
67e49b515c The PipelineManager.resize method along with WebGLPipeline.resize and anything else that extends them no longer receives or uses the resolution parameter. 2020-09-12 11:57:16 +01:00
Richard Davey
37a9261ac4 The CanvasRenderer no longer reads or uses the Game Config resolution property. 2020-09-12 11:56:11 +01:00
Richard Davey
b63cc75154 Remove Camera.resolution use 2020-09-12 11:55:38 +01:00
Richard Davey
f2fca49b3f Remove Camera resolution use 2020-09-12 11:55:26 +01:00
Richard Davey
d6f5aabb7e 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. 2020-09-12 11:55:06 +01:00
Richard Davey
0acdf4373f Formatting update 2020-09-12 11:53:36 +01:00
Richard Davey
c46c3e4c82 The Core.Config.resolution property has been removed. 2020-09-12 11:53:23 +01:00
Richard Davey
f0f93cde7d The CameraManager.onResize method no longer receives or uses the resolution parameter. 2020-09-12 11:52:40 +01:00
Richard Davey
3579d39fa2 The Camera.preRender method no longer receives or uses the resolution parameter. 2020-09-12 11:51:59 +01:00
Richard Davey
d1f2c9239c Resolution removal
* The `BaseCamera.resolution` property has been removed.
* The internal private `BaseCamera._cx`, `_cy`, `_cw` and `_ch` properties has been removed.
* The `BaseCamera.preRender` method no longer receives or uses the `resolution` parameter.
2020-09-12 11:51:37 +01:00
Richard Davey
3eece86179 Split v3.50 Change Log into its own file 2020-09-12 11:41:22 +01:00
Richard Davey
3e2aa36631 Update CHANGELOG.md 2020-09-12 10:37:33 +01:00
Richard Davey
5d4fe0a466 Fixed a few linting errors 2020-09-12 10:34:57 +01:00
Richard Davey
36cf9c456a
Merge pull request #5270 from rexrainbow/text-measureText
Get ascent and descent from context.measureText method
2020-09-12 10:30:19 +01:00
Richard Davey
74cd3c5d93 Merge branch 'master' of https://github.com/photonstorm/phaser 2020-09-12 10:28:20 +01:00
Richard Davey
b90ecf8f6d Update CHANGELOG.md 2020-09-12 10:28:18 +01:00
Richard Davey
887e0d8a15
Merge pull request #5302 from samme/feature/copyPosition
Add Phaser.GameObjects.Components.Transform#copyPosition
2020-09-12 10:26:51 +01:00
Richard Davey
34e1d6b345
Merge pull request #5300 from EmilSV/fix_name
Says webglRender but it is in PipelineManager
2020-09-11 18:12:40 +01:00
samme
ad0c5ad5db Docs: since 2020-09-11 10:01:43 -07:00
samme
f05129f30c Add Transform#copyPosition
Needs JSDoc types for Vector3Like, Vector4Like
2020-09-11 09:44:31 -07:00
Emil Schnedler Vad
e1106a0112 Says webglRender but it is in PipelineManager 2020-09-11 18:44:11 +02:00
Richard Davey
18d0d58cb5 Spine Plugin updated for Beta 6 2020-09-11 16:53:50 +01:00
Richard Davey
e7245d11cc Update CHANGELOG.md 2020-09-11 16:27:22 +01:00
Richard Davey
9cd4c1bb0a Refactored to use local vars 2020-09-11 16:27:21 +01:00
Richard Davey
d844402d4d
Merge pull request #5298 from samme/feature/audio-config-default
Add default value for Phaser.Core.Config#audio
2020-09-11 16:25:50 +01:00