Skip to content

Instantly share code, notes, and snippets.

@mvaneijgen
Created April 23, 2020 09:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mvaneijgen/9cb1b3aef6dabb51e27d20fac8e8eeed to your computer and use it in GitHub Desktop.
Save mvaneijgen/9cb1b3aef6dabb51e27d20fac8e8eeed to your computer and use it in GitHub Desktop.
import Vue from 'vue'
import { gsap } from "gsap";
import { DrawSVGPlugin } from "../static/DrawSVGPlugin.min.js";
import { MorphSVGPlugin } from "../static/MorphSVGPlugin.min.js";
import ScrollMagic from 'scrollmagic'
import 'imports-loader?define=>false!scrollmagic/scrollmagic/uncompressed/plugins/animation.gsap'
gsap.registerPlugin(DrawSVGPlugin, MorphSVGPlugin);
const GSAPScrollMagic = {
install(Vue, options) {
Vue.prototype.$GSAP = {
gsap,
DrawSVGPlugin,
MorphSVGPlugin
}
// ScrollMagic
Vue.prototype.$ScrollMagic = {
Controller: ScrollMagic.Controller,
Scene: ScrollMagic.Scene
}
}
}
Vue.use(GSAPScrollMagic)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment