@@ -48,13 +48,14 @@ yarn add nuxt-gsap # or npm install nuxt-gsap
4848```
4949## options
5050
51- You can pass different options using module inline options:
51+ You can pass different options using module inline options, with gsap 3 you probably want to use only plugins :
5252
5353``` js
5454 buildModules: [
5555 ' nuxt-gsap' , [
5656 {
57- imports: [' Back' , ' Circ' ] // Specify the gsap modules you want to import. By default, gsap & Linear are loaded
57+ imports: [' Power2' ], // Specify the gsap modules you want to import. By default, gsap is loaded
58+ plugins: [' PixiPlugin' , ' ScrollTrigger' ] // Various plugins to load, gsap.registerPlugin() will be called on each of them
5859 }
5960 ]
6061 ]
@@ -67,7 +68,8 @@ or nuxtGsap section in nuxt.config.js
6768 ' nuxt-gsap'
6869 ],
6970 nuxtGsap: {
70- imports: [' Back' , ' Circ' ] // Specify the gsap modules you want to import. By default, gsap & Linear are loaded
71+ imports: [' Power2' ], // Specify the gsap modules you want to import. By default, gsap is loaded
72+ plugins: [' PixiPlugin' , ' ScrollTrigger' ] // Various plugins to load, gsap.registerPlugin() will be called on each of them
7173 }
7274```
7375
@@ -89,7 +91,7 @@ index.vue
8991export default {
9092 mounted () {
9193 this .$nextTick (() => { // When using $refs, must wait for nextTick
92- const tl = this .$gsap .timeline ({ repeat: - 1 , ease: this .$gsap .Linear .easeInOut (2 ) })
94+ const tl = this .$gsap .timeline ({ repeat: - 1 , ease: this .$gsap .Power2 .easeInOut (2 ) })
9395 tl .to (' .test' , 2 , { x: 200 }) // With css selector
9496 tl .to (this .$refs .test , 0.5 , { x: 0 }) // With refs
9597 })
0 commit comments