Aimack Posted January 14, 2023 Share Posted January 14, 2023 I am a js newbie and I understand that t is the target and e is the event property of the method gsap.to. Not sure what the property r is here. Also, I was trying to see the actual code for gsap.to method but couldn't find it. How do I get that? Just trying to understand how it works under the hood. Link to comment Share on other sites More sharing options...
Solution GreenSock Posted January 14, 2023 Solution Share Posted January 14, 2023 Hi @Aimack. Yes, the first parameter is the target and the 2nd parameter is the vars object with all the configuration details. The 3rd isn't typically used - that's only there for legacy reasons (if someone uses the OLD syntax where the 2nd parameter was actually the duration and the 3rd was vars). I'd strongly recommend reading this: And also: https://greensock.com/docs/v3/GSAP/Tween There is no "event" property, just so you know. As for looking at the raw code, it's all in the download zip or you can go to the github repository here: https://github.com/greensock/GSAP/blob/master/src/gsap-core.js But if you're new to JavaScript, I don't think it'll be helpful to look at the source code. It'll probably totally confuse or overwhelm you. GSAP is written to be optimized for performance, not readability in the code. Enjoy the tools and good luck on your learning adventure. ? 2 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