Open jordwalke opened 12 years ago
One other thing that I forgot to mention was that I noticed that there is a slight delay when initiating a fling. I've tried toggling requestAnimationFrame
modes without seeing much of a difference.
1) I agree on the bounce speed – the bounce uses a cubic bezier, but the speed is rather messily approximated at the moment, and could definitely be calculated using a much better technique.
2) Momentum doesn't currently accumulate, so I suspect the scroll being stopped by the initial touch causes the loss of velocity you're seeing. Because a CSS animation has to be interrupted, and replaced by position changes in response to touches, there'll almost certainly currently be this judder. Changing this is more difficult - if a fling is underway, and a scroll interruption occurs, we'd have to not interrupt the animation for a short time and instead wait to see other inputs to decide whether to interrupt or accelerate. This may cause actual scroll stopping to feel slower...
I think I've seen the slight delay when initiating a fling on Android - which browser and platform are you seeing it on?
Thanks :)
The delay that I noticed was actually in iOS (iPhone 4s) and is more noticeable when there are images in the scroll region.
Interesting. Not iOS 6 perchance?
No, not iOS 6.
Besides,I suppose that the user experience of FTscroller can be much better.
I spend one afternoon for the optimization.I try to edit FTscroller's source code.
1,822line bouceDuration = 150;
2,Set a maximum value of bouceDistance
3,Speedup the scrollWheel.
I think that iScroll has the best user experience in Web App Plugins.But iScroll had been one year without updating and many many bugs.So FTscroller can absorb some advantages from it.:-)
hi, I noticed that articles on app.ft.com have a very natural bounce, on my iPhone 5 ay least. Much better than the examples. Isn't ftscroller used anymore? It seems native.
Hi Richard,
Well spotted - native scrolling is currently used on iOS article pages, although only on smallscreen devices. That's mostly for legacy reasons, but is actually due to be switched over soon.
There have been consistent comments that the scrolling doesn't feel right, and I agree - this will be worked on at some point, as soon as I have the time...
ok, thanks for responding.
Yes, native scrolling on iOS is great, unbeatable I think. Using FTScroller as fallback could be a fine solution on legacy devices and Android (where native scrolling isn't optimal yet IMO).
I must say that Zynga Scroller is pretty good, only has some glitches when bouncing sometimes. Other than that it's near native. Maybe you could use their physic calculations.
@rvanzon: That depends on what you are doing. Try using ZyngaScroller to dynamically load in new content that has many images. You'll see that image decoding is likely going to start making the scrolling choppy. I believe that FTScroller's approach is more resilient to that, but that native overflow-touch-scrolling is near flawlessly resilient to that. However, with native overflow-touch-scrolling there are some things that you just can't do, but you can do with Zynga or FTScroller.
+1
+1
:+1:
I thought I'd provide some feedback on the feel of ftscroller. While animating, the experience is quite smooth - better than most examples of scrolling that I see. However, there seems to be a couple of issues.
Have you or anyone else found some very nice CubicBezier constants to try?