Jump to content
Search Community

How to use splitText text reveal animation with scrollSmoother?

nicolaseielll test
Moderator Tag

Go to solution Solved by nicolaseielll,

Recommended Posts

My text reveal animation works perfectly fine without scrollSmoother but after I implement it to the code, the animated headings wont appear at all. How do I use this with scrollSmoother?

 

Here's the code that works without scrollSmoother:

let headings = this.$gsap.utils.toArray('.split-text');
var SplitText = this.$SplitText
 
headings.forEach((heading) => {
let splitHeading = new SplitText(heading, {type: 'chars'})
 
this.$gsap.from(splitHeading.chars, {
opacity: 0,
rotation: 4,
y: 50,
ease: 'back.out',
duration: 1,
stagger: 0.03,
scrollTrigger: heading
})
})
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...