Good start, but it'd be nicer if the swipe gesture was tracked live and the transition performed once the touch point was released (taking velocity into account for bonus points). This'd be more like the iOS home screen switch gesture (imagine if that didn't track live!).
Hi, author of the post here. I'll admit I kept the premise simple here in order to provide a more introduction on how to "roll your own" effects without too much overhead.
That is nice, thanks for the link :). It's a pity the touch events don't include finger velocity -- you can confuse the velocity tracker in that example by swiping back and forth quickly before releasing.
Comments
Good start, but it'd be nicer if the swipe gesture was tracked live and the transition performed once the touch point was released (taking velocity into account for bonus points). This'd be more like the iOS home screen switch gesture (imagine if that didn't track live!).
Hi, author of the post here. I'll admit I kept the premise simple here in order to provide a more introduction on how to "roll your own" effects without too much overhead.
The sort of thing you've described seems to have been implemented pretty well as a zepto plugin: http://blog.kojo.com.au/flickable-zepto-plugin/ (in particular this demo: http://blog.kojo.com.au/demos/flickable/demo2.html ) which works wonderfully on my Galaxy Nexus, but I haven't had much of a chance to play with this yet!
That is nice, thanks for the link :). It's a pity the touch events don't include finger velocity -- you can confuse the velocity tracker in that example by swiping back and forth quickly before releasing.
Android has a whole bunch of velocity trackers, but they're probably expensive in JS (solve least squares, etc). Code is here: https://github.com/android/platform_frameworks_base/blob/mas...