AngusSimons
Content Type
Profiles
Forums
Store
Blog
Product
Showcase
FAQ
Downloads
Posts posted by AngusSimons
-
-
I think that one big cons with localStorage and sessionStorage is that your page transitions will not work with history on the browser. And the workaround for this issue make more convenient to use a SPA.
- 2
-
Hey folks,
I'm trying to setup GSDevTools on a Vuejs using Npm and Webpack.
All the plugins are in the folder:
/node_modules/gsap
I'm using Vuejs and my component looks like:
<template lang="html"> <div> <div id="animate" @click="animateIt"> content </div> </div> </template> <script> import {TimelineMax, CSSPlugin, Sine, GSDevTools} from 'gsap' export default { name: 'ComponentName', data: () => ({ var_1: 'dummy' }), methods: { animateIt: function() { var t1 = new TimelineMax() t1.to('#animate', .2, { opacity: 1, ease: Sine.easeInOut }) .to('#animate', .2, { css: { color: red, }, ease: Sine.easeIn }) } }, mounted() { GSDevTools.create() } } </script>
For others plugins they work as expected so i can import them when needed using for example:
import {TimelineMax, CSSPlugin, Sine, Power4} from 'gsap'
But if I add the GSDevTools as for the others this doesn't work.
If I import the plugin with:
import {GSDevTools} from 'gsap' // or import GSDevTools from 'gsap/GSDevTools' // or import GSDevTools from '../../../node_modules/gsap/GSDevTools' // or import * as GSDevTools from '../../../node_modules/gsap/GSDevTools' // or var GSDevTools = require ('gsap/GSDevTools') // or var GSDevTools = require ('../../../node_modules/gsap/GSDevTools')
I got this error:
Quote[Vue warn]: Error in mounted hook: "TypeError: Cannot read property 'create' of undefined"
I'm stucked, please Help!!!
Thanks
GSDevTools with npm, Webpack and Vuejs 2.x
in GSAP
Posted
Thanks for the reply, no problem for the confusion.
I've tried again importing with
but got the same error. I've already tried all these possibilities