Commit graph

131 commits

Author SHA1 Message Date
Richard Davey
023343c789 All events have a type of string. Fix #6136 2022-09-21 22:01:03 +01:00
Richard Davey
a4d8e87095 Fixed lint errors 2022-05-10 17:06:53 +01:00
Martín Capello
e668dccc8b Fix frame durations when creating animations with createFromAseprite function 2022-04-27 17:07:02 -03:00
samme
dfa6e8646a
Docs: correct generateFrameNames() example
Fixes #6054
2022-03-29 17:38:37 -07:00
Richard Davey
59fbcc5ca3 Updated copyright year 2022-02-28 14:29:51 +00:00
Phaser Editor 2D
e0ec267efc
Tag as optional the anims.chain() argument.
The `chain()` method accepts no argument to reset the chain of animations.
2022-01-02 16:59:59 -05:00
Richard Davey
08bc828493 Removed duplicate docs line 2021-12-21 18:01:59 +00:00
Richard Davey
8a38f04ef2 You can now create Aseprite anims directly on a Sprite 2021-12-14 17:46:10 +00:00
Richard Davey
bf087e5068 Fixed JSDocs. Fix #5833 #5835 2021-09-20 11:51:21 +01:00
Richard Davey
f95d1d224b Animation.createFromAseprite would calculate an incorrect frame duration if the frames didn't all have the same speed. 2021-06-01 16:11:27 +01:00
Richard Davey
c1f7753dd8 Typo. Fix #5649 2021-04-13 13:40:06 +01:00
Richard Davey
1861174c21 When an Animation has skipMissedFrames set it will now bail out of the skip catch-up loop if any of the frames cause the animation to complete. Fix #5620 2021-03-26 09:43:36 +00:00
Richard Davey
6761ec92f5 Fixed docs. Fix #5484 2021-02-16 13:32:13 +00:00
Richard Davey
3a90ecc889 Update AnimationManager.js 2020-11-26 10:59:54 +00:00
Richard Davey
a5cb3779df JSDoc fixes 2020-11-23 15:29:08 +00:00
Richard Davey
bbcc83489f Fixed JSDocs 2020-11-23 11:39:01 +00:00
Richard Davey
417f7684c3 More integer to number changes 2020-11-23 10:32:00 +00:00
Richard Davey
02c34cd64e Replace integer with number 2020-11-23 10:22:13 +00:00
Richard Davey
4e7c8c1b23 Fixed defs #5405 2020-11-20 11:33:50 +00:00
Richard Davey
f0348126de Improved docs 2020-10-06 09:59:16 +01:00
Richard Davey
b285b2b5bb Expose manager functions. Fix #5345 2020-10-06 09:59:16 +01:00
Richard Davey
30d80bb74b Added keyframe 2020-10-05 08:06:53 +01:00
Richard Davey
4dfa49fc05 Fix return states 2020-09-30 09:23:58 +01:00
Richard Davey
ea73a72b73 Restored animation complete key event. 2020-09-09 16:08:59 +01:00
Richard Davey
8b2c9edce2 GenerateFrameNames can now accept the start and end parameters in reverse order, meaning you can now do { start: 10, end: 1 } to create the animation in reverse. 2020-09-08 13:40:20 +01:00
Richard Davey
dfb71fe2a6 Fixes to GenerateFrameNumbers
* `GenerateFrameNumbers` would include the __BASE frame by mistake in its calculations. This didn't end up in the final animation, but did cause a cache miss when building the animation.
* `GenerateFrameNumbers` can now accept the `start` and `end` parameters in reverse order, meaning you can now do `{ start: 10, end: 1 }` to create the animation in reverse.
2020-09-08 13:01:11 +01:00
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
cdd612a273 AnimationState has moved namespace to keep things logically together 2020-09-08 09:31:59 +01:00
Richard Davey
bd19929006 JSDoc fix 2020-09-07 16:03:06 +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
ace5b8cafb Update Animation.js 2020-09-07 11:32:46 +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
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
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
5979864dc4 Use new method name and parameter order 2020-09-04 11:50:13 +01:00
Richard Davey
1d798441f3 Support repeat count for stopping 2020-09-04 11:40:32 +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
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
050c2a61b6 Fixed data-type 2020-09-03 17:36:36 +01:00
Richard Davey
15c6e7718c New Animation events 2020-09-03 15:04:09 +01:00
Richard Davey
a2f0c2e7e3 Added getTotalFrames and calculateDuration methods. 2020-09-02 17:43:44 +01:00
Richard Davey
fe74eb70f7 Create PlayAnimationConfig.js 2020-09-02 17:41:23 +01:00
Richard Davey
f58f94ecf6 Formatting 2020-09-02 14:42:26 +01:00
tobias
9f1cd22882 Fix typo for documentation on create method of AnimationManager on line 190 2020-08-25 00:43:22 +08:00
Richard Davey
2af65b2a1d Improved JSDocs and types. Fix #5217 2020-08-24 15:04:00 +01:00
Richard Davey
e4a784cb8b Lint fixed version of #4373 2020-04-27 14:40:42 +01:00
Richard Davey
e1b8b04623
Merge pull request #4975 from JasonHK/jsdoc
Fixed `this` return types
2020-04-27 13:25:58 +01:00