Open gillyspy opened 3 years ago
@juliangarnier are you still actively developing?
in case you are wondering this feature does not really change any of the current behaviour but makes promises a more reasonable use-case here.
Nice!
Yes I am, v3.3.0 is coming along nicely, but there are still a lot to do.
Can you rebase this PR on the v3.3.0 branch ? I'm adding tests to 3.3, it would be nice if you can update tests/promises.test.js to reflect the changes of this PR.
Thanks
the promise behind an animation is a bit awkward to use. It is a deferred pattern that the anime controls internally and recreates. There are 2 situations that are problematic:
Situation A
because the resolve does not return the instance i find that i am regularly assigning a variable to the animation and then referring to that in promises. This is a bit awkward, especially for combined promises (like race, etc)
after this PR
Situation B
An instance that is not in a timeline will never really resolve if there is no timeline attached but the animation is removed. This is because there is an internal pause that user-code cannot know about; e.g.:
after this PR