epranka / scrollmagic-plugin-gsap

Add animation.gsap.js plugin to ScrollMagic in ES6 with no problems
MIT License
29 stars 5 forks source link

Missing Plugin 'animation.gsap'. Please make sure to include plugins/animation.gsap.js #8

Open Mainbird opened 4 years ago

Mainbird commented 4 years ago

Hi, I am using gsap 2.1.3, scrollmagic 2.0.7 and your plugin: scrollmagic-plugin-gsap 1.0.4, but I still get the following error:

(ScrollMagic.Scene) -> ERROR calling setTween() due to missing Plugin 'animation.gsap'. Please make sure to include plugins/animation.gsap.js

if I take a look at the browser dev tools console. My example file looks like this:

import * as ScrollMagic from 'scrollmagic';
import {TweenMax, TimelineMax} from 'gsap';
import {ScrollMagicPluginGsap} from 'scrollmagic-plugin-gsap';

export default () => {
    const d = document;
    ScrollMagicPluginGsap(ScrollMagic, TweenMax, TimelineMax);

    d.addEventListener('DOMContentLoaded', () => {
        // ...
    });
};

Should I import the plugin animation.gsap from scrollmagic, too or did I miss something?

Pashkella commented 4 years ago

Use import ScrollMagic from "scrollmagic";

audetcameron commented 8 months ago

can confirm changing import * as ScrollMagic from 'scrollmagic'; to import ScrollMagic from "scrollmagic"; did the trick for me.