Jump to content
Search Community

Can GreenSock help reduce jitter in my Parallax?

RZephyr07 test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

The company I work for wants to implement a parallax effect into their corporate website.

 

They tasked me with the job of creating a solution, and I had pretty good success basically just dropping in and using the basicScroll.js library.

 

I noticed the performance was pretty good, but not quite as good as our mockup in SquareSpace that uses the same effect. I added translateZ to force rending onto the GPU, but it's still just not quite there, with occasionally jittery animation when rapidly scrolling up and down.

 

One thing I noticed is that basicScroll might be excessively using requestAnimationFrame, whereas other implementations seem to be only onscroll. That's one possibility. Another possibility is that there is a more performant solution, such as with GSAP. I'm not sure though, since 3D transforms should be pretty darn good, based on my research.

 

Can I -- or even, should I -- recreate this using GSAP? I'm not quite sure what an optimal solution would look like from a coding perspective.

 

I'm not exactly advanced or even intermediate with Javascript, so forgive me. I do prefer to use vanilla Javascript when possible, since I am still learning... and it tends to be less bloated.

See the Pen XYgvNb by RZephyr07 (@RZephyr07) on CodePen

Link to comment
Share on other sites

Sorry, not really sure what to tell you. I didn't see any animation in the demo and I'm not at all familiar with basicScroll.js so I don't what it's doing under the hood. I'd guess that the majority of high-end sites that have scroll-driven animation are using GreenSock with ScrollMagic. 

 

ScrollMagic hasn't been actively developed (or supported) for awhile but I'm confident it can handle what you need to do for this project and GSAP is highly optimized for performance.

  • Like 2
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...