Jump to content
Search Community

GSAP - Register Plugin error (when trying to use Start and Markers)

shaneharley test
Moderator Tag

Recommended Posts

Have a bit of an odd problem. From what I can tell my GSAP is working, but when I try to add a start position, and turn on markers, I get a lot of these errors thrown.  Weird thing is, the GSAP animations I have setup still work?

'Invalid property markers set to true Missing plugin? gsap.registerPlugin()'

 

I'm using nextJS and importing my GSAP like follows (I also feel like I've tried every version of imports)

import { gsap } from "gsap";
import { ScrollTrigger } from "gsap/dist/ScrollTrigger";

gsap.registerPlugin(ScrollTrigger);

 

Link to comment
Share on other sites

Okay, few other things I've noticed. 

Works here

  //this cycles through each section and creates the triggers
  pageSections.forEach(section => {
    ScrollTrigger.create({
      trigger: section,
      start: 'top top+=100',
      markers: true,
      onEnter: self => checkColorTheme(section),
      onEnterBack: self => checkColorTheme(section)
    });
  })
}

but not here

  ref.current.forEach(el => {
    gsap.from(el, {
      scrollTrigger: el,
      autoAlpha: 0,
      start: 'top top+=100',
      markers: true,
      delay: 0.5
    });
  });

 

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