Mobius Posted October 10, 2022 Share Posted October 10, 2022 Hi there, i tried to find the doc for gsap.to() with the following interface from the official doc, but no results found. can someone tell me where to find the relevant docs? gsap.to( dict, { frame: , snap, ease}) cheers gsap.to(anim, { frame: frameCount - 1, snap: "frame", ease: "none", scrollTrigger: { scrub: 1.5 }, onUpdate: render // use animation onUpdate instead of scrollTrigger's onUpdate }); See the Pen 2152a28cffe2c2c0cca8a3e47f7b21c6?editors=0010 by osublake (@osublake) on CodePen Link to comment Share on other sites More sharing options...
akapowl Posted October 10, 2022 Share Posted October 10, 2022 Hello @Mobius - welcome to the forum. That example tweens on the values of a custom made object const airpods = { frame: 0 }; so you wouldn't really find anything on frame in the docs. Basically it does what you can find in the Getting Started Article at 'What else can I animate?' >>> 'Any numeric value, color, or complex string containing numbers' I also stepped through what is going on in that example in the post linked below. Maybe that will help. For more info on snap https://greensock.com/docs/v3/GSAP/CorePlugins/SnapPlugin For more info on ease https://greensock.com/docs/v3/Eases For more info on scrollTrigger https://greensock.com/docs/v3/Plugins/ScrollTrigger 2 Link to comment Share on other sites More sharing options...
Mobius Posted October 10, 2022 Author Share Posted October 10, 2022 akapowl thank you for your relpy. GSAP is awesome, much faster than my existing image sequence animation js. 3 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