Jump to content
Search Community

Problems using scrollTrigger in Vue.js project

Filip Rogić test
Moderator Tag

Recommended Posts

I'm having an issue using the scrollTrigger functionality inside my Vue project.

 

Here's the code of the animation:

 

gsap.timeline({
    scrollTrigger: {
        trigger: '.model',
    }
}).fromTo('.model', {autoAlpha: 0}, {duration: 1, autoAlpha: 1});

 

which is located inside my animations method. With this code I get a console warning that says missing plugin? gsap.registerPlugin() (see attached image) but when I add gsap.registerPlugin(ScrollTrigger) in the method i get an error that says Uncaught TypeError: Cannot read property 'name' of undefined (see 2nd attached image)

 

Before the export I have

 

import {
    gsap,
    ScrollTrigger
} from 'gsap'

 

What am I missing? None of the solutions available online were of any help to me... Thanks.

Screenshot from 2021-06-01 12-41-06.png

Screenshot from 2021-06-01 12-42-19.png

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