Jump to content
Search Community

Lelc

Members
  • Posts

    2
  • Joined

  • Last visited

Posts posted by Lelc

  1. 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?
×
×
  • Create New...