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
+84-4Lines changed: 84 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,12 @@ being passed to the simulation. The default value is 1 to remain consistent with
19
19
* HTML5AudioSound.setVolume is a chainable way to set the volume of a single Sound instance.
20
20
* HTML5AudioSound.setSeek is a chainable way to set seek to a point of a single Sound instance.
21
21
* HTML5AudioSound.setLoop is a chainable way to set the loop state of a single Sound instance.
22
+
* BitmapText has a new property `letterSpacing` which accepts a positive or negative number to add / reduce spacing between characters (thanks @wtravO)
23
+
* 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)
24
+
* 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)
25
+
* Graphics.slice allows you to easily draw a Pacman, or slice of pie shape to a Graphics object.
26
+
* 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.
27
+
* 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.
22
28
23
29
### Bug Fixes
24
30
@@ -27,8 +33,20 @@ being passed to the simulation. The default value is 1 to remain consistent with
27
33
* PathFollower.start has been renamed to `startFollow`, but PathFollower.setPath was still using `PathFollower.start` (thanks @samid737)
28
34
* BaseSoundManager.rate and BaseSoundManager.detune would incorrectly called `setRate` on its sounds, instead of `calculateRate`.
29
35
* The Gamepad Axis `getValue` method now correctly applies the threshold and zeroes out the returned value.
30
-
* Tween.Restart handles removed tweens properly and readds them back into the
31
-
active queue for the TweenManager
36
+
* The HueToComponent module was not correctly exporting itself. Fix #3482 (thanks @jdotrjs)
37
+
* Matter.World was using `setZ` instead of `setDepth` for the Debug Graphics Layer, causing it to appear behind objects in some display lists.
38
+
* Game.destroy now checks to see if the `renderer` exists before calling destroy on it. Fix #3498 (thanks @Huararanga)
39
+
* Keyboard.JustDown and Keyboard.JustUp were being reset too early, causing them to fail when called in `update` loops. Fix #3490 (thanks @belen-albeza)
40
+
* RenderTexture.destroy no longer throws an error when called. Fix #3475 (thanks @kuoruan)
41
+
* The WebGL TileSprite batch now modulates the tilePosition to avoid large values being passed into the UV data, fixing corruption when scrolling TileSprites over a long period of time. Fix #3402 (thanks @vinerz@FrancescoNegri)
42
+
* LineCurve.getResolution was missing the `divisions` argument and always returning 1, which made it fail when used as part of a Path. It now defaults to return 1 unless specified otherwise (thanks _ok)
43
+
* A Game Object enabled for drag would no longer fire over and out events after being dragged, now it does (thanks @jmcriat)
44
+
* Line.getPointA and Line.getPointB incorrectly set the values into the Vector2 (thanks @Tomas2h)
45
+
* DynamicTilemapLayer now uses the ComputedSize component, which stops it breaking if you call `setDisplaySize` (thanks Babsobar)
46
+
* StaticTilemapLayer now uses the ComputedSize component, which stops it breaking if you call `setDisplaySize` (thanks Babsobar)
47
+
* CanvasPool.first always returned `null`, and now returns the first available Canvas. Fix #3520 (thanks @mchiasson)
48
+
* When starting a new Scene with an optional `data` argument it wouldn't get passed through if the Scene was not yet available (i.e. the game had not fully booted). The data is now passed to the Scene `init` method and stored in the Scene Settings data property. Fix #3363 (thanks @pixelhijack)
49
+
* Tween.Restart handles removed tweens properly and readds them back into the active queue for the TweenManager (thanks @wtravO)
32
50
33
51
### Updates
34
52
@@ -40,8 +58,70 @@ active queue for the TweenManager
40
58
* The ComputedSize Component now has `setSize` and `setDisplaySize` methods. This component is used for Game Objects that have a non-texture based size.
41
59
* The GamepadManager now extends EventEmitter directly, just like the KeyboardManager does.
42
60
* The Gamepad Axis threshold has been increased from 0.05 to 0.1.
43
-
44
-
Also, my thanks to the following for helping with the Phaser 3 Examples, either by reporting errors or fixing them: @gabegordon@melissaelopez@samid737@nbs@tgrajewski@pagesrichie@hexus
61
+
* Utils.Array.FindClosestInSorted has a new optional argument `key` which will allow you to scan a top-level property of any object in the given sorted array and get the closest match to it.
62
+
* Vector2.setTo is a method alias for Vector2.set allowing it to be used inter-changeably with Geom.Point.
63
+
* List.add can now take an array or a single child. If an array is given it's passed over to List.addMultiple.
64
+
* List.add has a new optional argument `skipCallback`.
65
+
* List.addAt has a new optional argument `skipCallback`.
66
+
* List.addMultiple has a new optional argument `skipCallback`.
67
+
* List.remove has a new optional argument `skipCallback`.
68
+
* List.removeAt has a new optional argument `skipCallback`.
69
+
* List.removeBetween has a new optional argument `skipCallback`.
70
+
* List.removeAll has a new optional argument `skipCallback`.
71
+
72
+
### Animation System Updates
73
+
74
+
We have refactored the Animation API to make it more consistent with the rest of Phaser 3 and to fix some issues. All of the following changes apply to the Animation Component:
75
+
76
+
* Animation durations, delays and repeatDelays are all now specified in milliseconds, not seconds like before. This makes them consistent with Tweens, Sounds and other parts of v3. You can still use the `frameRate` property to set the speed of an animation in frames per second.
77
+
* All of the Animation callbacks have been removed, including `onStart`, `onRepeat`, `onUpdate` and `onComplete` and the corresponding params arrays like `onStartParams` and the property `callbackScope`. The reason for this is that they were all set on a global level, meaning that if you had 100 Sprites sharing the same animation, it was impossible to set the callbacks to fire for just one of those Sprites, but instead they would fire for all 100 and it was up to you to figure out which Sprite you wanted to update. Instead of callbacks animations now dispatch events on the Game Objects in which they are running. This means you can now do `sprite.on('animationstart')` and it will be invoked at the same point the old `onStart` callback would have been. The new events are: `animationstart`, `animtionrepeat`, `animationupdate` and `animationcomplete`. They're all dispatched from the Game Object that has the animation playing, not from the animation itself. This allows you far more control over what happens in the callbacks and we believe generally makes them more useful.
78
+
* The AnimationFrame.onUpdate callback has been removed. You can now use the `animationupdate` event dispatched from the Game Object itself and check the 2nd argument, which is the animation frame.
79
+
* Animation.stopAfterDelay is a new method that will stop a Sprites animation after the given time in ms.
80
+
* Animation.stopOnRepeat is a new method that will stop a Sprites animation when it goes to repeat.
81
+
* Animation.stopOnFrame is a new method that will stop a Sprites animation when it sets the given frame.
82
+
* Animation.stop no longer has the `dispatchCallbacks` argument, because it dispatches an event which you can choose to ignore.
83
+
*`delay` method has been removed.
84
+
*`setDelay` allows you to define the delay before playback begins.
85
+
*`getDelay` returns the animation playback delay value.
86
+
*`delayedPlay` now returns the parent Game Object instead of the component.
87
+
*`load` now returns the parent Game Object instead of the component.
88
+
*`pause` now returns the parent Game Object instead of the component.
89
+
*`resume` now returns the parent Game Object instead of the component.
90
+
*`isPaused` returns a boolean indicating the paused state of the animation.
91
+
*`paused` method has been removed.
92
+
*`play` now returns the parent Game Object instead of the component.
93
+
*`progress` method has been removed.
94
+
*`getProgress` returns the animation progress value.
95
+
*`setProgress` lets you jump the animation to a specific progress point.
96
+
*`repeat` method has been removed.
97
+
*`getRepeat` returns the animation repeat value.
98
+
*`setRepeat` sets the number of times the current animation will repeat.
99
+
*`repeatDelay` method has been removed.
100
+
*`getRepeatDelay` returns the animation repeat delay value.
101
+
*`setRepeatDelay` sets the delay time between each repeat.
102
+
*`restart` now returns the parent Game Object instead of the component.
103
+
*`stop` now returns the parent Game Object instead of the component.
104
+
*`timeScale` method has been removed.
105
+
*`getTimeScale` returns the animation time scale value.
106
+
*`setTimeScale` sets the time scale value.
107
+
*`totalFrames` method has been removed.
108
+
*`getTotalFrames` returns the total number of frames in the animation.
109
+
*`totalProgres` method has been removed as it did nothing and was mis-spelt.
110
+
*`yoyo` method has been removed.
111
+
*`getYoyo` returns if the animation will yoyo or not.
112
+
*`setYoyo` sets if the animation will yoyo or not.
113
+
*`updateFrame` will now call `setSizeToFrame` on the Game Object, which will adjust the Game Objects `width` and `height` properties to match the frame size. Fix #3473 (thanks @wtravO@jp-gc)
114
+
*`updateFrame` now supports animation frames with custom pivot points and injects these into the Game Object origin.
115
+
*`destroy` now removes events, references to the Animation Manager and parent Game Object, clears the current animation and frame and empties internal arrays.
116
+
* Changing the `yoyo` property on an Animation Component would have no effect as it only ever checked the global property, it now checks the local one properly allowing you to specify a `yoyo` on a per Game Object basis.
117
+
* Animation.destroy now properly clears the global animation object.
118
+
* Animation.getFrameByProgress will return the Animation Frame that is closest to the given progress value. For example, in a 5 frame animation calling this method with a value of 0.5 would return the middle frame.
119
+
120
+
### Examples, Documentation and TypeScript
121
+
122
+
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:
Copy file name to clipboardExpand all lines: README.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -70,7 +70,7 @@ Extra special thanks to our top-tier sponsors: [Orange Games](http://orangegames
70
70
71
71
Every week we publish the [Phaser World](https://phaser.io/community/newsletter) newsletter. It's packed full of the latest Phaser games, tutorials, videos, meet-ups, talks, and more. The newsletter also contains our weekly Development Progress updates which let you know about the new features we're working on.
72
72
73
-
Over 100 previous editions can be found on our [Back Issues](http://phaser.io/community/backissues) page.
73
+
Over 100 previous editions can be found on our [Back Issues](https://phaser.io/community/backissues) page.
@@ -137,7 +137,7 @@ Also, please subscribe to the [Phaser World](https://phaser.io/community/newslet
137
137
138
138
### Source Code Examples
139
139
140
-
During our development of Phaser 3, we created hundreds of examples with the full source code and assets. Until these examples are fully integrated into the Phaser website, you can browse them on [Phaser 3 Labs](http://labs.phaser.io), or clone the [examples repo][examples]. Note: Not all examples work, sorry! We're tidying them up as fast as we can.
140
+
During our development of Phaser 3, we created hundreds of examples with the full source code and assets. Until these examples are fully integrated into the Phaser website, you can browse them on [Phaser 3 Labs](https://labs.phaser.io), or clone the [examples repo][examples]. Note: Not all examples work, sorry! We're tidying them up as fast as we can.
141
141
142
142
### Create Your First Phaser 3 Example
143
143
@@ -147,7 +147,7 @@ Create an `index.html` page locally and paste the following code into it:
0 commit comments