schtew Posted April 15, 2023 Share Posted April 15, 2023 Hey all, I'm looking to create a mirroring effect at the end of my animation, such that the image would flip over the y axis by the end of the animation. Something like transform: scaleX(-1) which triggers on every animation repetition. In other words, consider this example: A shark image moves to the right, flips, goes back to the left, flips again, and repeats. Seems pretty simple but I don't know of any built in functionality with GSAP that can accomplish the desired. Any suggestions? Thanks! Link to comment Share on other sites More sharing options...
Rodrigo Posted April 15, 2023 Share Posted April 15, 2023 Hi @schtew and welcome to the GreenSock forums! You should take a look at the CSS Plugin docs: https://greensock.com/docs/v3/GSAP/CorePlugins/CSSPlugin You can definitely tween scales with GSAP gsap.to(element, {scaleX: -1}); Hopefully this helps. If you have more questions, please remember to include a minimal demo. Happy Tweening! 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