Jump to content
Search Community

Animate multiple objects with the same timeline

camAnana test
Moderator Tag

Go to solution Solved by 1amShaw,

Recommended Posts

Hi, I'm new to gsap and I'm trying to create a complex scroll animation where I need to animate multiple objects in a different way using the same timeline. 

 

This is my current code, but my issue with this is that each time I add a ".to" animation it creates a small delay between each one, and I need it to happen at the same time

gsap.registerPlugin(ScrollTrigger);

let tl = gsap.timeline({
	scrollTrigger: {
  	trigger: ".usages-scroll1",
    start: "center center",
    end: "bottom center",
    toggleActions: "restart pause reverse pause",
    markers: {startColor: "green", endColor: "red"}
  }
});

tl.to(".usage-finance", {
  x: 500
})
.to(".usage-people", {
  x: 200
});

How can I make it happen all at the same time? Thanks

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