Jump to content
GreenSock

Amini

Using Lottie files with scrollTrigger

Recommended Posts

Hi, I've created scrollTrigger which will be applied on the titles as you can see. The lottie files interactivity working well before reaching the trigger, but it wouldn't play anymore after the scrollTrigger is applied on the trigger `.wrapper`. My purpose is to animate the lottie files the same as the wrapper-child get animated.

See the Pen mdxedYN by amini-py (@amini-py) on CodePen

Link to comment
Share on other sites

I'm not seeing any GSAP-related problems, @Amini

 

LottieInteractivity is not a GreenSock product, so we can't really support that. I don't know how it is tracking the scroll position. My guess is that maybe it's constantly looking at getClientBoundingRect() or using IntersectionObserver, so when you pin the container, it's not animating further. You'd need to ask the author of LottieInteractivity for support if that isn't working properly. 

 

Keep in mind that we have a helper function in our docs for hooking up Lottie files to ScrollTrigger. So maybe you don't even need LottieInteractivity. 🤷‍♂️

  • Like 1
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.
×