Jump to content
Search Community

Scaling svgs

friendlygiraffe test
Moderator Tag

Go to solution Solved by GreenSock,

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

  • Solution

Chrome is trying to optimize performance by layerizing the element (pushing it to the GPU during the animation). You can disable this by setting force3D:false on your tween, or if you want to do that by default for all tweens, do:

CSSPlugin.defaultForce3D = false;

Of course that also means it may not animate as smoothly because the browser has to fabricate all the pixels on every frame. 


You can get the best of both worlds by building it so that your SVG's native size is at its biggest state and then scale it down initially. In other words, never make the scale go above 1. So in your example you're scaling it to 1000% (scale:10), so just build it so that its native size is 10x bigger, scale it down with GSAP and animate it up to scale:1. 

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