4 ms·
The correct way would be a mix of those two strategies: an onscroll handler that schedules an update through requestAnimationFrame (ensuring that it only gets s
by vincentriemer 5y ago
The correct way would be a mix of those two strategies: an onscroll handler that schedules an update through requestAnimationFrame (ensuring that it only gets scheduled once until the next frame update actually executes).
- goatherders 5y agoThe correct way is the way that works, which this does.
- osrec 5y agoWell, perhaps, but it's unnecessarily inefficient.
- tekromancr 5y agoI mean, it's inefficient as for the 120 seconds you play with it. I don't think it's worth spending more time trying to perfect something like this.
- framecowbird 5y agoit barely works for me on mobile. very jittery