ashthornton / asscroll

Ash's Smooth Scroll 🍑
MIT License
947 stars 27 forks source link

Touch scroll performance using with Webgl #51

Open iamlinkus opened 3 years ago

iamlinkus commented 3 years ago

Hey!

Tried the Touch-friendly DOM/WebGL Sync on my iPhone and found that the performance is strange: webgl planes flicker when moving and seem not to be updating at the same speed as the dom elements.

Tried replacing touchScrollType to transform and it synced up the planes to the dom elements, but it also made both of them flicker, whereas with scrollTop only the webgl context was flickering.

Videos with scrollTop and transform.

Hardware/software specs: iPhone X, iOS 14.5.1, Chrome & Safari (both latest). Tried it on the ios simulator on mac - same there. Desktop is fine.

If it'd be my guess without looking at the code, I'd say either there's a problem with throttling of the event that updates the scroll position or it just plain can't keep up with the framerate.

Let me know if I can help with anything else.

iamlinkus commented 3 years ago

Hey, @ashthornton , any news on this?

ashthornton commented 3 years ago

Haven't had time to investigate this yet @iamlinkus, hoping to get to it over the next few days. Will keep you posted.