Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
eomerb

staggerTo different values

Recommended Posts

hello there,

I am working on a stagger which scales down to 1 from 1+(0.1*index of array)

I am tryin to reverse it but I cannot use .reverse() because I am changing some values in other tweens I have to create a new timelinemax and do the reverses one by one.

the scale is 1 and I needed to increase to 1+(0.1*index of array)

how can I write different values to scale

I can create another timeline and reverse this one but it will be better if I can write to different values.

thanks

 

Link to comment
Share on other sites

Hey eomerb and welcome to the GreenSock forums!

 

It's hard for us to help precisely without seeing your code for ourselves. But most likely you should set the scale using a function. Something like this (using GSAP 3):

gsap.to(".class", {duration: 1.5, scale: function(index, elem) { return 1 + (0.1 * index) }, stagger: 0.5});

In terms of reversing, the proper thing to do is dependent on your setup. Can you please create a minimal demo of what you're trying to do? This thread can help you do so:

 

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.

×