Jump to content
Search Community

Parallax effect for a DrawSVG + ScrollTrigger animation

eo33 test
Moderator Tag

Recommended Posts

I have a DrawSVG ScrollTrigger animation and I want to scrub through the animation much much slower than scroll speed. 
It takes up 100vh and I would like it to scroll through 100% after 500vh of scrolling. 

I tried wrapping the document in a ScrollSmoother wrapper and set data-speed for the containing div but it didn't work.

Any pointers?

Link to comment
Share on other sites

By setting:
 

start: "top 70%" ,
end: "bottom 70%",
ease: "none"

the svg will always draw at 70% viewport height.

Pinning + using once: "true"creates a tonne of space above which I suppose I could change with an onComplete callback function (I think) but I really don't want to use pinning as I'd prefer the scroll speed of the element to change, thus meaning the SVG path draws slower. 

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