Jump to content
Search Community

tips for optimizing GSAP animations

RDima test
Moderator Tag

Recommended Posts

Good afternoon. I have the following situation.

 

There is a website page where there are many different animations using GSAP (parallax effect, 3D transformations when mouseover at an object, etc.). Almost all animations are started using ScrollTrigger. In addition, there are a lot of graphics on the page (the pictures are optimized, but there are still a lot of them). As a result, the page takes a long time to load.

 

At the moment, this is not a critical problem, but I noticed that due to the long loading of images and other elements, sometimes GSAP animations fail. In particular, animations either do not work, or the coordinates of the location are lost. On the advice from the forum, I solved the problem like this: I create all GSAP animations only after the page is fully loaded. The solution is working, but I would like to know if there are any other ways to optimize

Link to comment
Share on other sites

Other than animating transforms instead of layout properties and making your images smaller - not really.

GSAP does the performance stuff automatically for you!

The main performance killers would be animating stuff like filters or drop shadows, loading huge images or animating lots of SVG elements.

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