Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
Blake

Trigger a timeline animation with Scrolltrigger using a useEffect Hook

Recommended Posts

Hi there, 

I'd like to be able to trigger a timeline animation when a user reaches a certain section of my single page application. Right now I've got a timeline animation setup in a useEffect hook inside the component I'd like to animate, and I'd love to start that timeline at the correct moment. I'm exploring ideas and would love some guidance if anyone has some insight here.

Thanks in advance,
Blake

 

Link to comment
Share on other sites

Hi All! I figured out my query with a little help from this amazing video walkthrough. 

Hope it helps someone else out too! The ability to add the scrollObject property directly to a Timeline instance is amazing. That did the trick and now I can properly load my timelines into any component with a useEffect hook, and they'll only trigger when they meet their start/end markers. This is beautiful sorcery :)
   



 

  • Like 2
  • Thanks 1
Link to comment
Share on other sites

  • Blake changed the title to Trigger a timeline animation with Scrolltrigger using a useEffect Hook

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.
×