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
+33-6Lines changed: 33 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,14 +4,13 @@
4
4
5
5
### New Features
6
6
7
-
* A new property was added to the scene config, `mapAdd` which is used to extend the default injection map of a scene instead of overwriting it.
8
-
* A new property was added to Matter.World, `correction` which is used in the Engine.update call and allows you to adjust the time
9
-
being passed to the simulation. The default value is 1 to remain consistent with previous releases.
10
-
* Group.destroy has a new optional argument `destroyChildren` which will automatically call `destroy` on all children of a Group if set to true (the default is false, hence it doesn't change the public API). Fix #3246 (thanks @DouglasLapsley)
7
+
* A new property was added to Matter.World, `correction` which is used in the Engine.update call and allows you to adjust the time being passed to the simulation. The default value is 1 to remain consistent with previous releases.
11
8
* Matter Physics now has a new config property `getDelta` which allows you to specify your own function to calculate the delta value given to the Matter Engine when it updates.
12
9
* Matter Physics has two new methods: `set60Hz` and `set30Hz` which will set an Engine update rate of 60Hz and 30Hz respectively. 60Hz being the default.
13
10
* Matter Physics has a new config and run-time property `autoUpdate`, which defaults to `true`. When enabled the Matter Engine will update in sync with the game step (set by Request Animation Frame). The delta value given to Matter is now controlled by the `getDelta` function.
14
11
* Matter Physics has a new method `step` which manually advances the physics simulation by one iteration, using whatever delta and correction values you pass in to it. When used in combination with `autoUpdate=false` you can now explicitly control the update frequency of the physics simulation and unbind it from the game step.
12
+
* Matter Physics has two new debug properties: `debugShowJoint` and `debugJointColor`. If defined they will display joints in Matter bodies during the postUpdate debug phase (only if debug is enabled) (thanks @OmarShehata)
13
+
* Group.destroy has a new optional argument `destroyChildren` which will automatically call `destroy` on all children of a Group if set to true (the default is false, hence it doesn't change the public API). Fix #3246 (thanks @DouglasLapsley)
15
14
* WebAudioSound.setMute is a chainable way to mute a single Sound instance.
16
15
* WebAudioSound.setVolume is a chainable way to set the volume of a single Sound instance.
17
16
* WebAudioSound.setSeek is a chainable way to set seek to a point of a single Sound instance.
@@ -21,12 +20,33 @@ being passed to the simulation. The default value is 1 to remain consistent with
21
20
* HTML5AudioSound.setSeek is a chainable way to set seek to a point of a single Sound instance.
22
21
* HTML5AudioSound.setLoop is a chainable way to set the loop state of a single Sound instance.
23
22
* BitmapText has a new property `letterSpacing` which accepts a positive or negative number to add / reduce spacing between characters (thanks @wtravO)
24
-
* Matter Physics has two new debug properties: `debugShowJoint` and `debugJointColor`. If defined they will display joints in Matter bodies during the postUpdate debug phase (only if debug is enabled) (thanks @OmarShehata)
25
23
* You can now pass a Sprite Sheet or Canvas as the Texture key to `Tilemap.addTileset` and it will work in WebGL, where-as before it would display a corrupted tilemap. Fix #3407 (thanks @Zykino)
26
24
* Graphics.slice allows you to easily draw a Pacman, or slice of pie shape to a Graphics object.
27
25
* List.addCallback is a new optional callback that is invoked every time a new child is added to the List. You can use this to have a callback fire when children are added to the Display List.
28
26
* List.removeCallback is a new optional callback that is invoked every time a new child is removed from the List. You can use this to have a callback fire when children are removed from the Display List.
29
27
* ScenePlugin.restart allows you to restart the current Scene. It's the same result as calling `ScenePlugin.start` without any arguments, but is more clear.
28
+
* Utils.Array.Add allows you to add one or more items safely to an array, with optional limits and callbacks.
29
+
* Utils.Array.AddAt allows you to add one or more items safely to an array at a specified position, with optional limits and callbacks.
30
+
* Utils.Array.BringToTop allows you to bring an array element to the top of the array.
31
+
* Utils.Array.CountAllMatching will scan an array and count all elements with properties matching the given value.
32
+
* Utils.Array.Each will pass each element of an array to a given callback, with optional arguments.
33
+
* Utils.Array.EachInRange will pass each element of an array in a given range to a callback, with optional arguments.
34
+
* Utils.Array.GetAll will return all elements from an array, with optional property and value comparisons.
35
+
* Utils.Array.GetFirst will return the first element in an array, with optional property and value comparisons.
36
+
* Utils.Array.GetRandomElement has been renamed to GetRandom and will return a random element from an array.
37
+
* Utils.Array.MoveDown will move the given array element down one position in the array.
38
+
* Utils.Array.MoveTo will move the given array element to the given position in the array.
39
+
* Utils.Array.MoveUp will move the given array element up one position in the array.
40
+
* Utils.Array.Remove will remove the given element or array of elements from the array, with an optional callback.
41
+
* Utils.Array.RemoveAt will remove the element from the given position in the array, with an optional callback.
42
+
* Utils.Array.RemoveBetween will remove the elements between the given range in the array, with an optional callback.
43
+
* Utils.Array.Replace will replace an existing element in an array with a new one.
44
+
* Utils.Array.SendToBack allows you to send an array element to the bottom of the array.
45
+
* Utils.Array.SetAll will set a property on all elements of an array to the given value, with optional range limits.
46
+
* Utils.Array.Swap will swap the position of two elements in an array.
47
+
* TransformMatrix.destroy is a new method that will clear out the array and object used by a Matrix internally.
48
+
* BaseSound, and by extension WebAudioSound and HTMLAudioSound, will now emit a `destroy` event when they are destroyed (thanks @rexrainbow)
49
+
* A new property was added to the Scene config: `mapAdd` which is used to extend the default injection map of a scene instead of overwriting it (thanks @sebashwa)
30
50
31
51
### Bug Fixes
32
52
@@ -51,10 +71,12 @@ being passed to the simulation. The default value is 1 to remain consistent with
51
71
* Tween.restart handles removed tweens properly and reads them back into the active queue for the TweenManager (thanks @wtravO)
52
72
* Tween.resume will now call `Tween.play` on a tween that was paused due to its config object, not as a result of having its paused method called. Fix #3452 (thanks @jazen)
53
73
* LoaderPlugin.isReady referenced a constant that no longer exists. Fix #3503 (thanks @Twilrom)
74
+
* Tween Timeline.destroy was trying to call `destroy` on Tweens instead of `stop` (thanks @Antriel)
75
+
* Calling `setOffset` on a Static Arcade Physics Body would break because the method was missing. It has been added and now functions as expected. Fix #3465 (thanks @josephjaniga and @DouglasLapsley)
54
76
55
77
### Updates
56
78
57
-
* The RTree library (rbush) used by Phaser 3 suffered from violating CSP policies by dynamically creating Functions at run-time in an eval-like manner. These are now defined via generators. Fix #3441 (thanks @jamierocks@Colbydude)
79
+
* The RTree library (rbush) used by Phaser 3 suffered from violating CSP policies by dynamically creating Functions at run-time in an eval-like manner. These are now defined via generators. Fix #3441 (thanks @jamierocks@Colbydude@jdotrjs)
58
80
* BaseSound has had its `rate` and `detune` properties removed as they are always set in the overriding class.
59
81
* BaseSound `setRate` and `setDetune` from the 3.3.0 release have moved to the WebAudioSound and HTML5AudioSound classes respectively, as they each handle the values differently.
60
82
* The file `InteractiveObject.js` has been renamed to `CreateInteractiveObject.js` to more accurately reflect what it does and to avoid type errors in the docs.
@@ -77,6 +99,11 @@ being passed to the simulation. The default value is 1 to remain consistent with
77
99
* SceneManager._processing has been renamed to `isProcessing` which is now a boolean, not an integer. It's also now public and read-only.
78
100
* SceneManager.isBooted is a new boolean read-only property that lets you know if the Scene Manager has performed its initial boot sequence.
79
101
* TransformMatrix has the following new getter and setters: `a`, `b`, `c`, `d`, `tx` and `ty`. It also has the following new getters: `scaleX`, `scaleY` and `rotation`.
102
+
* List.getByKey has been removed. Use `List.getFirst` instead which offers the exact same functionality.
103
+
* List.sortIndexHandler has been removed because it's no longer required.
104
+
* List.sort no longer takes an array as its argument, instead it only sorts the List contents by the defined property.
105
+
* List.addMultiple has been removed. Used `List.add` instead which offers the exact same functionality.
106
+
* List is now internally using all of the new Utils.Array functions.
0 commit comments