I need to use GSAP (Green Socks Animation) with angular application and not to affect the application performance or change the life cycle. Still, in the other hand, I need it to start on the component init or on scroll-triggered. So, how can I do that? Should I use something like angular zone or there's something more efficient?
I expect to use it like in a simple HTML CSS Jquery page and access all the components.
This can be tricky, but I found a solution, so I could see that Srolltrigger uses requestanimationframe behind the scenes, so you need to register it in the constructor like this:
in case your animations generate a continuous call to requestanimationframe, use this:
All this applies to libraries like swiper, lenis....The most important thing is to debug with angular devtools profiler