Just_Jack Posted April 20, 2023 Share Posted April 20, 2023 Hey folks! Does anyone have an example of a left to right image reveal effect using GSAP? Link to comment Share on other sites More sharing options...
Rodrigo Posted April 20, 2023 Share Posted April 20, 2023 Hi, Without a minimal demo or an example is really hard to know exactly what you mean. Maybe clip path could be helpful in this scenario. Here is an example that uses ScrollTrigger, which can be removed super easy in order to use just GSAP: See the Pen eYjoOEW by GreenSock (@GreenSock) on CodePen In order to create a lateral reveal you only have to change the start and end values. This tool is super helpful for that. https://bennettfeely.com/clippy/ Finally remember that when using clip path with GSAP always express the values in percentage: gsap.to(image, { clipPath: "polygon(0% 100%, 100% 100%, 100% 0%, 0% 0%)" }); Hopefully this helps. 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