sagar_dev Posted March 29, 2023 Share Posted March 29, 2023 I am a junior frontend developer with little knowledge working with GSAP. I have only used GSAP for small animations in some component. But, now I have got a project where I want to apply animation across the page. My question is how can I write GSAP animation that seems fluid and match with other elements. Currently I am doing lots of magic numbers across different component. I write animation code for each component in their own component file and to match them with other component I am doing magic numbers with delay and duration. Please Help. Link to comment Share on other sites More sharing options...
elegantseagulls Posted March 29, 2023 Share Posted March 29, 2023 You can setup animation components and import those into your other components in to avoid repeating code. Also, we've found using https://greensock.com/docs/v3/GSAP/gsap.registerEffect() and making the effects into hooks works pretty well across bigger projects. 4 Link to comment Share on other sites More sharing options...
sagar_dev Posted March 30, 2023 Author Share Posted March 30, 2023 I found this in the forum. This might me helpful as well. Link to comment Share on other sites More sharing options...
Cassie Posted March 30, 2023 Share Posted March 30, 2023 Quote Also, we've found using https://greensock.com/docs/v3/GSAP/gsap.registerEffect() and making the effects into hooks works pretty well across bigger projects. More info here - https://greensock.com/react-advanced#hooks 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