Jump to content
GreenSock

peacepostman

Help to improve performance

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

Hello !

 

I am trying to optimize a small plugin I've made for our website but i think i'm stuck and i was asking myself that maybe someone here have an idea to optimize things a bit.

 

I really think that the main problem is animating the left property, it's always a bad pratice in css, but i didn't success in setting an initial x value for each particules (Shame !)

 

Maybe the SVG effect is not helping the GPU performance also.

 

Best regards !

 

PS: CustomEase is in the codepen, i'm deeply sorry to include it but you dont provide any CDN, i can edit and remove it immediately but the codepen wont work anymore.  

 

See the Pen GGeZwO by peacepostman (@peacepostman) on CodePen

Link to comment
Share on other sites

Hi,

 

We CodePen-safe versions of all our plugins and *special* eases. You can learn more about that here: https://greensock.com/try-plugins and see a demo that makes it easy to copy and paste the urls of the tools you need.

 

The url for CustomEase is https://s3-us-west-2.amazonaws.com/s.cdpn.io/16327/CustomEase.min.js

 

I didn't notice any performance issues in your demo, but yes its generally recommended that you animate x instead of left.

Not sure why that was difficult. I think it would be best to take a few steps back and try to solve that. 

 

Perhaps you can make a much simpler demo that illustrates why you couldn't set the x of a single particle.

 

 

  • Like 2
Link to comment
Share on other sites

Hello, thanks for the link, the codepen is updated, i've had totally missed the fromTo function from the library, i'm having a try with this one.

 

Thanks !

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