SpaceMoney-01011000 Posted April 27, 2021 Share Posted April 27, 2021 Where can I find documentation on scaling? Link to comment Share on other sites More sharing options...
GreenSock Posted April 27, 2021 Share Posted April 27, 2021 Welcome to the forums, @SpaceMoney-01011000. There isn't documentation specifically about scaling (well, beyond some generic info about transforms in the CSSPlugin docs). That's because GSAP can animate literally any property of any object that JavaScript can touch. It's not limited to a pre-defined list of properties. It's a high-speed property manipulator. That being said, here's basic info assuming you're scaling DOM elements: You can animate "scale", like: gsap.to(".target", {scale: 2, duration: 1.5}); You can animate scaleX or scaleY to independently control scaling on the x-axis or y-axis: gsap.to(".target", {scaleX: 2, scaleY; 0.5, duration: 1}); (when you animate "scale" it's just a shortcut for animating BOTH scaleX and scaleY to the same value) It's always best to set any transform-related data directly via GSAP. We explain why here. Happy tweening! 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now