Jump to content
Search Community

Image Sequence Scrolling Animation GASP.TO() API Question

Mobius test
Moderator Tag

Recommended Posts

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

 

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

 

  • Like 2
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...