Closed armanogan closed 1 year ago
Thanks for your feedback @armanogan ! I'll look in to this when we start working on the next version :)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs.
Overview
...
Motivation
What is the purpose of using scroll event instead of Intersection Observer(https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API). Scroll event is working in the main thread , Intersection Observer is out of main thread and this small code reflow all the page on every scroll https://github.com/LottieFiles/lottie-interactivity/blob/7fc80bf513b6f9e05bc5025f867c3ccce0eae52e/src/main.js#L64 .You don`t even if use requestAnimationFrame in the scroll.
Even if you are going to do it with scroll why you aren't passing argument passive:false(not passing that argument is bad practice)?
Why you aren't caching variables window.innerHeight and window.innerWidth and change them after window resize?
I like this project. but the performance is very poor. ...
Labels
Type: Enhancement
label to this issue.