Open mpohl opened 10 years ago
yeah, the promise should resolve when it stops, regardless of whether it reaches it's destination. This is a bug. I'll fix it later today when I get back to my computer.
https://github.com/luster-io/impulse/blob/master/lib/decelerate.js#L28
should be
update.done(position, velocity)
If you need something FAST, as in right now, you can do promise.catch ( or promise['catch'] for older browsers ) which will get called when it "didn't reach end".
Great, thanks!
I need to know when a deceleration is finished, but using .then() only works if the position .end() is reached which might not happen. Is there a possible way to go?