PMWLTD Posted August 25, 2021 Share Posted August 25, 2021 I'm looking for something simple but I can't seem to find it in the docs. I found something with the old TweenMax but it's not relevant to GSAP 3 Basically, I have two arrays: Arr1 = [0,0] Arr2 = [50,40] I would like to tween arr1 to arr2 over some duration. If that's impossible, then splitting it into individual gsap.to's with individual variables would work too. I know this is pretty simple most likely but I'm pulling my hair out. Thanks! Link to comment Share on other sites More sharing options...
OSUblake Posted August 25, 2021 Share Posted August 25, 2021 You're looking for endArray. It's a little hard to find in the docs. https://greensock.com/docs/v3/GSAP/CorePlugins/EndArrayPlugin gsap.to(Arr1, { endArray: Arr2, onUpdate() { console.log(Arr1); } }); 5 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