Jump to content
Search Community

Using .to to translate an image as a function of the Tween's duration

Danraffe test
Moderator Tag

Go to solution Solved by GreenSock,

Recommended Posts

Hello,
I am new to GSAP and am wondering if it is possible to translate an object as a function of the tweens duration?

For example, if I wanted an image to "jump" in a single tween, could I call something like
gsap.to(".img", {y: () => {Math.sin(current duration * Math.PI)}, duration:1}

If so, how might I do that?

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...