Hi, Sorry if I didn't make it clear. Yes I'm suggesting an onReverseStart to mirror onStart, ie: when the playhead is at 1 and you call reverse() If we take the docs on onStart into account it would be described as:
onReverseStart : Function - A function that should be called when the tween reverses from the end state (when its playhead changes from 1 to some other value which can happen more than once if the tween is reversed multiple times).
It just seems like the API is incomplete, if you take these scenarios into account:
Playhead at 0 - call play - onStart
Playhead reaches 1 - onComplete
Playhead at 1 - call reverse - no callback
playhead reaches 0 - onReverseComplete
I will put together a demo, it's a fair point, although I'll have to do it a little later this evening - today's not a good day for spare time
Please feel free to leave any replies on that point until I've posted that demo!
Thanks for the answer with the easing, but again I didn't make it clear it seems. Your demo show's exactly what I was describing; if the tween ends with a bounce, the easing is reversed (in that it performs the same easing in exactly the opposite direction) and the animation starts with a bounce when it is reversed. ie: Bounce.easeOut does effectively become Bounce.easeIn. The question comes from the fact that I am migrating from velocity. With velocity, the easing applies to the "tween" the same way regardless of play direction. If you bounce out when playing forwards, you bounce out when playing backwards. This does seem to be a useful option to have in your API. Reversing is perfect for moving elements in or out of some key area (usually the viewport) but I would my elements to glide to a stop in both directions for example.
Here is your demo (poorly) migrated to velocity (okay I did manage to squeeze this one into the time I have).
Thanks for the feedback!