flim Posted October 18, 2021 Share Posted October 18, 2021 I am trying ScrollTrigger.create() but not sure how to make the scrub work if gasp.to() is a in a callback function. Any idea? See the Pen yLoOgPe by fredlim (@fredlim) on CodePen Link to comment Share on other sites More sharing options...
Solution akapowl Posted October 18, 2021 Solution Share Posted October 18, 2021 Hello @flim Is there any particular reason you need the tween to be in the onEnter callback? If you need to stick to the .create() method (vs adding a scrollTrigger to that tween itself - the commented out part in below example) you could just hook up a tweeen or timeline via ScrollTrigger's animation property. See the Pen 00ec094aec7abe63df27789734f88186 by akapowl (@akapowl) on CodePen 3 1 Link to comment Share on other sites More sharing options...
flim Posted October 19, 2021 Author Share Posted October 19, 2021 I see, just learned the animation property from your codepen. Thanks! 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now