Commit graph

15515 commits

Author SHA1 Message Date
Richard Davey
438fe3c0d1 No Update unless playing 2020-09-07 14:50:33 +01:00
Rex
a9e6604eb2 Support IE
IE and Firefox for Android do not have actualBoundingBoxAscent and actualBoundingBoxDescent properties.
Use origin solution to get ascent and descent.
2020-09-07 21:36:27 +08:00
Richard Davey
94298efc4d Because do/while loops are quite dangerous 2020-09-07 11:54:08 +01:00
Richard Davey
ec06e79b26 Catch stops 2020-09-07 11:52:37 +01:00
Richard Davey
f8867fd16e Update CHANGELOG.md 2020-09-07 11:32:58 +01:00
Richard Davey
2b374c7e14 AnimationState.skipMissedFrames is now used when playing an animation, allowing you to create animations that run at frame rates far exceeding the refresh rate, or that will update to the correct frame should the game lag. Close #4232 2020-09-07 11:32:55 +01:00
Richard Davey
ace5b8cafb Update Animation.js 2020-09-07 11:32:46 +01:00
Richard Davey
fd5f39f076 Update CHANGELOG.md 2020-09-07 10:26:21 +01:00
Richard Davey
24beb01963 Update AnimationState.js 2020-09-07 10:26:16 +01:00
Richard Davey
6eae9ca598 Fixed reference 2020-09-07 10:26:10 +01:00
Richard Davey
70110825da Console warning if frame doesn't exist
* `GenerateFrameNames` will now console.warn if the generated frame isn't present in the texture, which should help with debugging animation creation massively.
* `GenerateFrameNumbers` will now console.warn if the generated frame isn't present in the texture, which should help with debugging animation creation massively.
2020-09-07 10:26:04 +01:00
Richard Davey
d44fc88705 Update CHANGELOG.md 2020-09-05 12:01:14 +01:00
Richard Davey
ad4f0ce0c4 Updated docs 2020-09-05 12:01:11 +01:00
Richard Davey
4d74e74a31 Update CHANGELOG.md 2020-09-05 11:45:04 +01:00
Richard Davey
2cabbbd504 Renamed to AnimationState for clarity. 2020-09-05 11:45:00 +01:00
Richard Davey
ebfd211d60 Update CHANGELOG.md 2020-09-05 11:12:56 +01:00
Richard Davey
b0872c188a The Component.Animation.updateFrame method has now been removed. Everything is handled by setCurrentFrame instead, which removes one extra step out of the update process. 2020-09-05 11:12:52 +01:00
Richard Davey
af0f207cbb Update BuildGameObjectAnimation.js 2020-09-04 17:16:51 +01:00
Richard Davey
9f6572c0b9 Update CHANGELOG.md 2020-09-04 15:29:26 +01:00
Richard Davey
a2d395661c GameObjects.Shape.Grid would render a white fill even if you passed undefined as the fill color in the constructor. It now doesn't render cells if no fill color is given. 2020-09-04 15:29:22 +01:00
Richard Davey
1b6dfafc45 Update CHANGELOG.md 2020-09-04 14:04:04 +01:00
Richard Davey
89332aad5f You can now create Animations directly on Sprite
* `Component.Animation.create` is a new method that allows you to create animations directly on a Sprite. These are not global and never enter the Animation Manager, instead risiding within the Sprite itself. This allows you to use the same keys across both local and global animations and set-up Sprite specific local animations.
* All playback methods: `play`, `playReverse`, `playAfterDelay` and `playAfterRepeat` will now check to see if the given animation key exists locally on the Sprite first. If it does, it's used, otherwise it then checks the global Animation Manager for the key instead.
* `Component.Animation.remove` is a new method that will remove a locally stored Animation instance from a Sprite.
* `Component.Animation.get` is a new method that will return a locally stored Animation instance from the Sprite.
* `Component.Animation.exists` is a new method that will check if a locally stored Animation exists on the Sprite.
* The internal `Component.Animation.remove` method has been renamed to `globalRemove`.
* `Component.Animation.textureManager` is a new property that references the global Texture Manager.
* `Component.Animation.anims` is a new property that contains locally created Animations in a Custom Map.
2020-09-04 14:03:57 +01:00
Richard Davey
cee9ca00eb Improved docs 2020-09-04 13:58:34 +01:00
Richard Davey
66f4ab69e7 When playing an animation in reverse, if it reached the first frame and had to repeat, it would then jump to the frame before the final frame and carry on, skipping out the final frame. 2020-09-04 13:06:00 +01:00
Richard Davey
cebd1d0101 Tidy up order 2020-09-04 11:52:19 +01:00
Richard Davey
5979864dc4 Use new method name and parameter order 2020-09-04 11:50:13 +01:00
Richard Davey
c9193d038f Update CHANGELOG.md 2020-09-04 11:49:19 +01:00
Richard Davey
858ae68841 Removed startFrame, chain can take arrays, delayedPlay rename, playAfterRepeat method and playAfterDelay method. 2020-09-04 11:49:16 +01:00
Richard Davey
afef6da59c Exposed all of the new animation methods on a Sprite level 2020-09-04 11:48:17 +01:00
Richard Davey
1d798441f3 Support repeat count for stopping 2020-09-04 11:40:32 +01:00
Richard Davey
acac51bf39 Update CHANGELOG.md 2020-09-04 00:02:54 +01:00
Richard Davey
1a4b5b2779 AnimationManager.createFromAseprite is a new method that allows you to use animations created in the Aseprite editor directly in Phaser. 2020-09-04 00:02:51 +01:00
Richard Davey
5db6cba4ce Update CHANGELOG.md 2020-09-03 17:56:25 +01:00
Richard Davey
1515357039 Lots of updates (see full description)
* `Component.Animation.timeScale` is a new public property that replaces the old private `_timeScale` property.
* `Component.Animation.delay` is a new public property that replaces the old private `_delay` property.
* `Component.Animation.repeat` is a new public property that replaces the old private `_repeat` property.
* `Component.Animation.repeatDelay` is a new public property that replaces the old private `_repeatDelay` property.
* `Component.Animation.yoyo` is a new public property that replaces the old private `_yoyo` property.
* `Component.Animation.inReverse` is a new public property that replaces the old private `_reverse` property.
* `Component.Animation.startAnimation` is a new public method that replaces the old private `_startAnimation` method.
* The `Component.Animation.getProgress` method has been fixed so it will return correctly if the animation is playing in reverse.
* The `Component.Animation.remove` method will now always be called when an animation is removed, not just once.
* The `Component.Animation.getRepeat` method has now been removed. You can get the value from the `repeat` property.
* The `Component.Animation.setRepeatDelay` method has now been removed. You can set the value using the `repeatDelay` config property, or changing it at run-time.
* `Component.Animation.complete` is a new method that handles the completion in animation playback.
* The `Component.Animation.setTimeScale` method has now been removed. You can set the value using the `timeScale` config property, or changing it at run-time.
* The `Component.Animation.getTimeScale` method has now been removed. You can read the value using the `timeScale` property.
* The `Component.Animation.getTotalFrames` method has been fixed and won't error if called when no animation is loaded.
* The `Component.Animation.setYoyo` method has now been removed. You can set the value using the `yoyo` config property, or changing it at run-time.
* The `Component.Animation.getYoyo` method has now been removed. You can read the value using the `yoyo` property.
2020-09-03 17:56:22 +01:00
Richard Davey
13601ad31b Removed completeAnimation, load and setFrame and updated other methods to use new component properties. 2020-09-03 17:44:46 +01:00
Richard Davey
96bc2e89d3 Removed load and fixed staggerPlay 2020-09-03 17:42:10 +01:00
Richard Davey
b4b5338f28 Added playReverse, delayedPlay and stop methods and better docs. 2020-09-03 17:38:36 +01:00
Richard Davey
33cc87121c The BuildGameObjectAnimation function now uses the PlayAnimationConfig object to set the values. 2020-09-03 17:37:21 +01:00
Richard Davey
050c2a61b6 Fixed data-type 2020-09-03 17:36:36 +01:00
Richard Davey
b9e5f3e9bc GroupCreateConfig, which is used when calling Group.createMultiple or Group.createFromConfig, can now accept the following new properties: setOrigin: { x, y, stepX, stepY } which are applied to the items created by the Group. 2020-09-03 17:36:05 +01:00
Richard Davey
f505f6a3e3 Actions.setOrigin will now call updateDisplayOrigin on the items array, otherwise the effects can't be seen when rendering. 2020-09-03 17:34:16 +01:00
samme
803c300ae4 Add ArcadeWorldConfig.fixedStep 2020-09-03 07:32:44 -07:00
Richard Davey
15c6e7718c New Animation events 2020-09-03 15:04:09 +01:00
Richard Davey
28c6635ea3 Utils.Array.SortByDigits is a new function that takes the given array of strings and runs a numeric sort on it, ignoring any non-digits. 2020-09-03 15:01:55 +01:00
Richard Davey
bba8285665 Return type fix 2020-09-03 11:27:12 +01:00
Richard Davey
0ba7de7a60 Deps update 2020-09-03 09:41:23 +01:00
Richard Davey
793359cab6 Update CHANGELOG.md 2020-09-02 22:58:40 +01:00
Richard Davey
52c7406aa8 Update CHANGELOG.md 2020-09-02 22:55:54 +01:00
Richard Davey
d92195a8b8 Default rotation as well 2020-09-02 22:55:51 +01:00
Richard Davey
2d65ff169e Update CHANGELOG.md 2020-09-02 22:50:30 +01:00