Re:Show HN: Impulse – Dynamic JS Animations for the Mobile Web
by coderzach on Thursday August 28, 2014 @08:01PM
(#8240460)
Thanks a ton for looking into this, I made an issue at https://github.com/luster-io/impulse/issues/5
EDIT: Some debugging shows that "from" and "to" are both (0, 416). This is causing direction in Acceleration.onStart to be (0, 0), which causes acceleration to also be zero. However, velocity is not zero; it's some apparently random number. Also, the boundary bottom is set to Infinity, because it uses (to.y > from.y) instead of (to.y >= from.y), so it never enters a "bounce" state as it's impossible to go outside the boundary.
TL;DR: I think you need to add tests for when "to" and "from" are the same location.