Commit graph

15832 commits

Author SHA1 Message Date
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
Richard Davey
168fb9d2b7 Update CHANGELOG.md 2020-09-11 15:58:25 +01:00
Richard Davey
7475b15976 Preparing for Beta 6 2020-09-11 15:56:53 +01:00
Richard Davey
9746b473f8
Merge pull request #5297 from samme/fix/phaser-time-is-undefined
Fix Phaser.Time is undefined in Phaser.Time.Clock#addEvent
2020-09-11 15:56:26 +01:00
samme
93b5aebdbe Fix undefined TimerEvent
Fixes #5294
2020-09-11 07:45:22 -07:00
Richard Davey
dff71b6ae2 Update CHANGELOG.md 2020-09-11 15:29:04 +01:00
Richard Davey
6c8191f7c5 Fixed Audio and Video type defs. Fix #5295 2020-09-11 15:29:01 +01:00
Richard Davey
9f328700cb Update CHANGELOG.md 2020-09-11 15:22:56 +01:00
Richard Davey
1c2a79ac51 The Scale Managers GetScreenOrientation function will now check for window.orientation first, because iOS mobile browsers have an incomplete implementation of the Screen API, forcing us to use the window value as a priority. This means the Scale Manager will now emit orientationchange events correctly on iOS. Fix #4361 #4914 2020-09-11 15:22:53 +01:00
Richard Davey
60e311afe5 Updated JSDocs 2020-09-11 15:16:37 +01:00
Richard Davey
111702b820 Update CHANGELOG.md 2020-09-11 14:01:58 +01:00
Richard Davey
2acfbfbe71 Gamepad._created is a new private internal property that keeps track of when the instance was created. This is compared to the navigator timestamp in the update loop to avoid event spamming. Fix #4890. 2020-09-11 14:01:55 +01:00
Richard Davey
5ecdc3b4a2 The GamepadPlugin will now call refreshPads as part of its start process. This allows you to use Gamepads across multiple Scenes, without having to wait for a connected event from each one of them. If you've already had a connected event in a previous Scene, you can now just read the pads directly via this.input.gamepad.pad1 and similar. Fix #4890 2020-09-11 14:00:14 +01:00