Commit graph

15380 commits

Author SHA1 Message Date
Richard Davey
09d96d4e5e Now only dispatches one single event per action. Also added getFrameName method. 2020-09-08 12:17:38 +01:00
Richard Davey
d476032e9f Animation no longer extends the EventEmitter 2020-09-08 12:17:18 +01:00
Richard Davey
bbbae648b9 Deleted un-used events, renamed Sprite events and added lots more documentation. 2020-09-08 12:16:39 +01:00
Richard Davey
47f5cec6af Update CHANGELOG.md 2020-09-08 09:32:01 +01:00
Richard Davey
cdd612a273 AnimationState has moved namespace to keep things logically together 2020-09-08 09:31:59 +01:00
Richard Davey
6f2bf77557 Update CHANGELOG.md 2020-09-07 18:27:46 +01:00
Richard Davey
c6b503e9ed Update CHANGELOG.md 2020-09-07 16:40:05 +01:00
Richard Davey
5344d39498 Better Group docs. Fix #5011 2020-09-07 16:40:05 +01:00
Richard Davey
4af38a4836
Merge pull request #5285 from samme/feature/arcade-config-fixedstep
Add ArcadeWorldConfig.fixedStep
2020-09-07 16:24:49 +01:00
Richard Davey
dc99fd03aa Don't create if vertices already provided. Fix #5280 2020-09-07 16:03:36 +01:00
Richard Davey
5224985e7f Update BitmapMaskPipeline.js 2020-09-07 16:03:18 +01:00
Richard Davey
bd19929006 JSDoc fix 2020-09-07 16:03:06 +01:00
Richard Davey
d47e59944d Update CHANGELOG.md 2020-09-07 15:34:07 +01:00
Richard Davey
bc694ce4ac Beta 4 2020-09-07 15:34:04 +01:00
Richard Davey
98dc69ed23 Added in support for blending animations with addMix, getMix and removeMix. 2020-09-07 15:33:57 +01:00
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