Read/write batching for render loop #428
Replies: 1 comment
-
Hi @mattgperry, thank you for sharing the knowledge with us. TBH we're not very familiar with Lenis is designed to avoid "style thrashing" as much as possible. For instance, This Now that said I've been looking for a way to rely on As you described it in the Motion documentation, |
Beta Was this translation helpful? Give feedback.
-
Hey team!
I was about to write a guide for integrating Lenis with the Motion render loop and it got me thinking about how reads/writes are batched within Lenis. I've seen style thrashing when Lenis has been incorporated into Framer sites because of this and I think I'd still run into the same problem with
frame.read(lenis.raf, true)
or whatever.Have you ever though of exposing two manual raf functions, one each for reading (functions like
limit
) and writing (setting scroll position)? This way it could be set up likeBeta Was this translation helpful? Give feedback.
All reactions