Jump to content
Search Community

Optimizing scrollTriggered cards animation

Mando test
Moderator Tag

Recommended Posts

hi guys i created this little cards animation using GSAP ScrollTrigger plugin but i noticed some lag on less powerfull devices, is there a way to optimize my code? i'm a bit new to GSAP😊

i'll leave the codepen below

 

it's not scaling the way it does on the browser but trust me it does😂

See the Pen dyeMaWW by STR4NG3R (@STR4NG3R) on CodePen

Link to comment
Share on other sites

16 minutes ago, Cassie said:

The most performant properties to animate are opacity and transforms. Box shadow is going to cause issues.

 

Good luck!

hi, thankyou for responding! i didn't actually know that 😊, and what about the scrollTrigger instances that i'm creating into the forEach? do they impact on the performance? and is there a way not to create one of it for each card?

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