Richard Davey
3dd5d63bd3
Don't stop if not playing animation. Fix #6381
2023-02-01 17:22:46 +00:00
samme
06671cb810
Improve the missing texture/frame logic
2023-01-17 11:41:22 -08:00
samme
83ebb2d0e9
Fix the missing frame warning, refactor
2023-01-17 11:29:54 -08:00
Richard Davey
9c3a30e79f
Swap to use math const
2023-01-05 17:57:41 +00:00
Richard Davey
468bf7821d
Updated copyright year
2023-01-02 17:36:27 +00:00
Richard Davey
c4ba83819b
AnimationManager.getAnimsFromTexture
is a new method that will return all global Animations, as stored in the Animation Manager, that have at least one frame using the given Texture. This will not include animations created directly on local Sprites.
2022-12-14 17:44:13 +00:00
Richard Davey
af7ba68a19
When playing a chained animation, the nextAnim
property could get set to undefined
which would stop the next animation in the queue from being set. The check now handles all falsey cases. Fix #5852
2022-10-31 18:08:01 +00:00
Richard Davey
8434d45912
Animation.stop
is always called when a new animation is loaded, regardless if the animation was playing or not and the delayCounter
is reset to zero. This stops animations with delays preventing other animations from being started until the delay has expired. Fix #5680
2022-10-31 18:02:50 +00:00
Richard Davey
dfc794c339
Animation.showBeforeDelay
is a new optional boolean property you can set when creating, or playing an animation. If the animation has a delay before playback starts this controls if it should still set the first frame immediately, or after the delay has expired (the default).
2022-10-31 18:01:35 +00:00
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