Jump to content
Search Community

Intersection Observer to ScrollTrigger, is it worth it performance wise?

thad test
Moderator Tag

Recommended Posts

Hi all. 

Just recently I have created a site that runs GSAP tweens with intersection observer. There are quite few different animations going on. 
While I was developing site, scrollTrigger got released, and I imported scrollTrigger to test it, and I left it in project because of Scrub animations which are very nice, but everything else is powered by intersection observer.

I was wondering if it was worth it performance wise, to convert everything to scrollTrigger, especially now that scrollTrigger is included it project anyway?

Link to comment
Share on other sites

Intersection observers aren't intrinsically bad. In fact there are some rare cases where it makes more sense to have ScrollTriggers + intersection observers than only ScrollTriggers. ScrollTrigger just allows you to do more things than intersections observers, and especially do it more intuitively (I think).

  • Like 1
Link to comment
Share on other sites

3 minutes ago, ZachSaucier said:

rare cases where it makes more sense to have ScrollTriggers + intersection observers

I see. Please let me know if you have any example of those rare cases, would love to see them :)
Think I will just leave it as is. Was just wondering since I'm already using scrollTrigger for scrub animation. Thanks for comment

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...