zozo Posted April 27, 2022 Share Posted April 27, 2022 Hi there, I have this weird thing going on with the scale. The women is scaled down, and it's not really smooth as you can see on the code pen. Can you help me out please ? What am I doing wrong ? Thanks, See the Pen bGaXorz by romainmalauzat (@romainmalauzat) on CodePen Link to comment Share on other sites More sharing options...
Solution GreenSock Posted April 27, 2022 Solution Share Posted April 27, 2022 That's because you're animating "top" and "left" properties which the browser generally applies pixel snapping to. It's much better to animate "x" and "y" transforms. Not only do those perform better, but they allow sub-pixel rendering: See the Pen QWaeONy?editors=0010 by GreenSock (@GreenSock) on CodePen I also noticed: You're using a REALLY old version of GSAP. Like...ancient. You're using the very old syntax too. There's no more TweenMax, TimelineMax, TimelineLite, or TweenLite. Just a simple "gsap" object. Smaller file size, simpler API. You had typos in your easing strings (uppercase "O") and were using the newer string-based ease syntax with the super old version of TweenMax which won't work. It's not a good idea to reference elements with variables based on their ID in the HTML. Use selector text instead. // bad tl.to(women, ...) // good tl.to("#women", ...) Happy tweening! 3 Link to comment Share on other sites More sharing options...
PointC Posted April 27, 2022 Share Posted April 27, 2022 I'd use x/y instead of left/top. Also upgrade to the latest GSAP. See the Pen e0446716471d4a9d65ba1bae8f506a0f by PointC (@PointC) on CodePen 2 Link to comment Share on other sites More sharing options...
PointC Posted April 27, 2022 Share Posted April 27, 2022 I'm too slow. 🤣 2 Link to comment Share on other sites More sharing options...
zozo Posted April 27, 2022 Author Share Posted April 27, 2022 Thanks guys ! So fast, you rock !!!! Yeah I reused an old file, I should def update to the gsap. 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