Jump to content
Search Community

ScrollTrigger.batch with typescript

Lelc test
Moderator Tag

Recommended Posts

Hello guys,

 

I'm trying to use ScrollTrigger.batch with typescript, but I can't set the markers nor the triggers,

when I try yo put the markers for instance it says:

 

Argument of type '{ onEnter: (batch: Element[]) => Tween; markers: boolean; }' is not assignable to parameter of type 'ScrollTriggerBatchVars'.
Object literal may only specify known properties, and 'markers' does not exist in type 'ScrollTriggerBatchVars'.ts(2345)
 

my code so far:

  gsap.set(".work", { y: 100 });
 
    ScrollTrigger.batch(".work", {
      onEnter: (batch) =>
        gsap.to(batch, {
          opacity: 1,
          y: 0,
          stagger: { each: 0.15, grid: [1, 3},
          overwrite: true,
        }),
        markers: true,
    });
 
am I doing something wrong?
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...