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
+44-3Lines changed: 44 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,10 +49,51 @@ being passed to the simulation. The default value is 1 to remain consistent with
49
49
* The ComputedSize Component now has `setSize` and `setDisplaySize` methods. This component is used for Game Objects that have a non-texture based size.
50
50
* The GamepadManager now extends EventEmitter directly, just like the KeyboardManager does.
51
51
* The Gamepad Axis threshold has been increased from 0.05 to 0.1.
52
-
* Animation.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)
53
-
* Animation.updateFrame now supports animation frames with custom pivot points and injects these into the Game Object origin.
54
52
55
-
Also, my thanks to the following for helping with the Phaser 3 Examples and Docs, either by reporting errors, fixing them or helping author the docs: @gabegordon@melissaelopez@samid737@nbs@tgrajewski@pagesrichie@hexus@mbrickn@erd0s@icbat@Matthew-Herman
53
+
### Animation Component Updates
54
+
55
+
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:
56
+
57
+
* 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.
58
+
*`delay` method has been removed.
59
+
*`setDelay` allows you to define the delay before playback begins.
60
+
*`getDelay` returns the animation playback delay value.
61
+
*`delayedPlay` now returns the parent Game Object instead of the component.
62
+
*`load` now returns the parent Game Object instead of the component.
63
+
*`pause` now returns the parent Game Object instead of the component.
64
+
*`resume` now returns the parent Game Object instead of the component.
65
+
*`isPaused` returns a boolean indicating the paused state of the animation.
66
+
*`paused` method has been removed.
67
+
*`play` now returns the parent Game Object instead of the component.
68
+
*`progress` method has been removed.
69
+
*`getProgress` returns the animation progress value.
70
+
*`repeat` method has been removed.
71
+
*`getRepeat` returns the animation repeat value.
72
+
*`setRepeat` sets the number of times the current animation will repeat.
73
+
*`repeatDelay` method has been removed.
74
+
*`getRepeatDelay` returns the animation repeat delay value.
75
+
*`setRepeatDelay` sets the delay time between each repeat.
76
+
*`restart` now returns the parent Game Object instead of the component.
77
+
*`stop` now returns the parent Game Object instead of the component.
78
+
*`timeScale` method has been removed.
79
+
*`getTimeScale` returns the animation time scale value.
80
+
*`setTimeScale` sets the time scale value.
81
+
*`totalFrames` method has been removed.
82
+
*`getTotalFrames` returns the total number of frames in the animation.
83
+
*`totalProgres` method has been removed as it did nothing and was mis-spelt.
84
+
*`yoyo` method has been removed.
85
+
*`getYoyo` returns if the animation will yoyo or not.
86
+
*`setYoyo` sets if the animation will yoyo or not.
87
+
*`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)
88
+
*`updateFrame` now supports animation frames with custom pivot points and injects these into the Game Object origin.
89
+
*`destroy` now removes events, references to the Animation Manager and parent Game Object, clears the current animation and frame and empties internal arrays.
90
+
* 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.
91
+
92
+
### Examples, Documentation and TypeScript
93
+
94
+
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