Romanus Posted February 20, 2023 Share Posted February 20, 2023 Hello! I need the vars property "onReverse". But in the documentation I only found "onReverseComplete" I want to call a function when reverse starts. Is it possible? Link to comment Share on other sites More sharing options...
GreenSock Posted February 20, 2023 Share Posted February 20, 2023 Typically an onReverse isn't needed because all you need to do is put your function call wherever you call reverse() in your own code, but we do have a helper function in the docs for exactly what you're asking: https://greensock.com/docs/v3/HelperFunctions#onReverse Does that help? Link to comment Share on other sites More sharing options...
Romanus Posted February 20, 2023 Author Share Posted February 20, 2023 1 hour ago, GreenSock said: Typically an onReverse isn't needed because all you need to do is put your function call wherever you call reverse() in your own code, but we do have a helper function in the docs for exactly what you're asking: https://greensock.com/docs/v3/HelperFunctions#onReverse Does that help? See the Pen JjaGPWp?editors=0111 by romanusname (@romanusname) on CodePen I can not. onUpdate returns undefined to the console. What am I doing wrong? Link to comment Share on other sites More sharing options...
Solution Rodrigo Posted February 20, 2023 Solution Share Posted February 20, 2023 Hi, It won't work if you don't actually use it. Take a look at the link Jack provided in order to see how the helper function is implemented. Here is a fork of your codepen: See the Pen RwYrpOy by GreenSock (@GreenSock) on CodePen Hopefully this helps. Happy Tweening! 1 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