Richard Davey
1f8276ac76
Updated copyright year, company and author
2024-02-19 17:12:24 +00:00
Robert Kowalski
2e4b43be4e
AnimationFrame duration is the duration of the frame if set, msPerFrame is not added
2024-01-26 13:19:54 -05:00
Richard Davey
59438ad874
Both the Animation Config and the Play Animation Config allow you to set a new boolean property randomFrame
. This is false
by default, but if set, it will pick a random frame from the animation when it _starts_ playback. This allows for much more variety in groups of sprites created at the same time, using the same animation. This is also reflected in the new Animation.randomFrame
and AnimationState.randomFrame
properties.
2023-09-07 18:00:18 +01:00
Richard Davey
5961b821aa
Added missing property
2023-09-07 17:24:19 +01:00
samme
7338ca5793
Unprotect Animation#getFrameAt
2023-08-25 12:51:59 -07:00
T.J. Lipscomb
6272944f1e
Apply AnimationManager's global time scale to AnimationStates.
2023-07-03 11:43:29 -07:00
Richard Davey
19dfdeac14
jsdoc fixes and beta 23 prep
2023-03-31 18:39:40 +01:00
Richard Davey
5e0dd72153
You will now get a warning from the AnimationManager
and AnimationState
if you try to add an animation with a key that already exists. Fix #6434
2023-03-31 16:37:01 +01:00
Zeke Lu
382b233c3d
correct the docs for generateFrameNumbers
...
1. the function used in the example should be this.anims.generateFrameNumbers
instead of this.anims.generateFrameNames.
2. the end frame in the example should be 11 instead of 12
(see 6761ec92f5
).
3. mark the "config" parameter as optional (the one for generateFrameNames is
already marked as optional).
2023-03-05 13:02:32 +08:00
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