You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@IsraelThompson had a nice idea of having also a closing animation to complement the opening one in #49. He had some problems implementing it and might have had tapped a bug. But interesting idea indeed, let's discuss it, shall we.
Having a closing animation would expand the options API with:
definition of number of spins to be played back in order for the closing animation to happen,
definition of closing animation duration. Possibly in seconds, just like the opening option,
and maybe even definition of closing-specific speed to use instead of the normal speed.
All very nice. But I'm not sure about the usage scenarios. With the speed, opening and entry options , Reel already empowers you with two independent phases of animation, which both can reel in opposite directions. The first phase limited in duration and the second phase being a neverending self-resuming spin. From my point of view, by adding the closing, instead of having one duration-limited and one unlimited, we would be having three duration-limited phases.
That may look like a gain, but it's an overkill I'm afraid. What I recon instead in this issue is a need to define some sort of limit of how long the regular animation can play at once after "play" has been triggered. So that we can make the second animation phase duration-limited.
Or do we really need 3 phases when there are only 2 possible directions of playback?
The text was updated successfully, but these errors were encountered:
Ok, so at the end I've implemented one new option - duration - which accepts duration of animation play in seconds. When it is set, the animation will automatically stop after the given time. Triggering play event resets the duration counter and the animation will play for the given time and stop once again.
… API change can not land earlier than in 1.3. Please use [gh-90-duration branch](/pisi/Reel/tree/gh-90-duration] instead if you are interested in setting up animation duration. The `duration` option there is fully working and will be released in version 1.3.