No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    GSAP TweenMax

    Framework
    1
    2
    750
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Kentskyo
      Kentskyo last edited by

      When I install gsap via

      npm install gsap 
      

      and import in index.vue via:

      <script>
      import {TweenMax} from "gsap";
      

      I can reference TweenLite in a method:

      methods: {
          draw() {
               TweenLite.to("#c1", 1, {opacity:0.5, rotation:45});
      

      But when I try to reference TweenMax, I get an error

      TweenMax.to("#c1", 1, {opacity:0.5, rotation:45});
      Vue warn]: Error in event handler for "click": "TypeError: Cannot read property 'to' of undefined"
      

      Any idea why TweenMax is not resolved? It looks like all the modules are available under node_modules/gsap…

      confusing…
      Thanks!

      1 Reply Last reply Reply Quote 0
      • Kentskyo
        Kentskyo last edited by

        if I use:

        import TweenMax from 'gsap'
        

        it works… maybe a babel or webpack thing…

        1 Reply Last reply Reply Quote 0
        • First post
          Last post