Jump to content
Search Community

OSUblake last won the day on September 16 2023

OSUblake had the most liked content!

OSUblake

Moderators
  • Posts

    9,196
  • Joined

  • Last visited

  • Days Won

    708

Posts posted by OSUblake

  1. 2 hours ago, littledotchris said:

    I am having issues in a similar setup, though I appear to be getting a different error:
     

    
    # /node_modules/gsap/ScrollTrigger.js:517
    # export var ScrollTrigger = /*#__PURE__*/function () {
    # ^^^^^^
    #
    # SyntaxError: Unexpected token 'export'

     

    That means your environment doesn't support es modules. You can try umd modules.

     

    import { gsap } from "gsap/dist/gsap";
    import { ScrollTrigger } from "gsap/dist/ScrollTrigger";
    
    gsap.registerPlugin(ScrollTrigger);

     

    Also, you don't need to import the CSSPlugin. Where did you get that from? Need to stop incorrect information from spreading.

     

    • Like 2
  2. Transpile the modules.

     

    If you have nuxt set to universal mode (SSR), then you'll need to register any plugins client side.

    import { gsap } from "gsap";
    import { Draggable } from "gsap/Draggable";
    
    if (process.client) {
      gsap.registerPlugin(Draggable);
    }

     

     

    • Like 2
  3. 6 minutes ago, Greg Stager said:

    I had considered typing the code up as I spoke and decided not to as a way to keep the videos shorter.

     

    I actually like watching the code being typed, even if it makes the video longer. I just hate it when the coding happens too fast, and you miss what was typed. I guess that's what I really like about Scrimba, you can edit the teacher's code.

     

     

  4. 12 hours ago, mmontoya said:

    Here is a Codepen, showing how I am using the endArray property to create the beginnings of an ink-bleeding effect by Tweening PIXI's ColorMatrix filter:
     

     

     

    This demo needs to be referenced somewhere on this site. 💯

     

     

    • Like 3
  5. Nice tutorials! Made me think of Scrimba. Ever heard it?

    https://scrimba.com/

     

    I just came across it a couple of weeks ago and was blown away. It's combines video with a live code editor. The video and code are kept in sync, and you can edit the edit the code to see changes. I think some gsap courses on Scrimba would be freaking amazing.

     

    cc @Carl

    • Like 4
  6. You can't import from a script tag. Just register the plugin. 

    https://codesandbox.io/s/x-ion-gmbh-logo-po9q2?file=/src/Logo.js

     

    You should probably read up on the migration guide. You're using lots of deprecated syntax.

     

    Duration goes inside the vars object now. Stagger is a property. And eases are just strings. No need to import them.

    tl.to(
      streak,
      {
        duration: 0.01,
        opacity: 0,
        ease: "back",
        stagger: -0.02
      }
    );

     

    • Like 3
  7. 5 minutes ago, GreenSock said:

    The issue was that for performance reasons, I was using a bitwise ~~ instead of Math.floor(), but the bitwise operator doesn't handle huge values

     

    I thought I brought this up before. I guess this fixes it too.

     

     

     

  8. 13 minutes ago, h0rhay said:

    I have tried using the .tar.gz as documented but am struggling to see how this would work in production as you need to have dependencies in the package.json in order for the project to build.

     

    Then you didn't install it. Follow the documentation.

    https://greensock.com/docs/v3/Installation

     

    And watch the videos all the way through.

     

    You don't need TimelineMax. And it's better to use braces as it gives you autocomplete.

     

    import { gsap } from 'gsap'
    import { DrawSVGPlugin } from 'gsap/DrawSVGPlugin'
    gsap.registerPlugin(DrawSVGPlugin);
    //const plugins = [drawSVG]

     

    • Like 4
  9. 30 minutes ago, GreenSock said:

    Oh, of course - we're fully aware that if someone really wants to steal it, that ain't terribly difficult. But it's one thing to be loaded behind the scenes in a web site, and quite another to be in an "open source" repo that's specifically designed to make it super easy for developers to snag/view/edit, advertised as "open source". See what I mean?

     

    Theoretical here. How you would feel if the gsap-bonus.tgz was in a public repo, but renamed something different, and nested inside several folders so it wasn't obvious?

     

    It seems that most users don't have a good understanding of what's going on with the .tgz file. They just think gsap shows up magically.

     

    giphy.gif

     

     

     

  10. 10 minutes ago, aaronLejeune said:

    I am thinking scrollmagic so that's why I posted here ;)

     

    ScrollMagic isn't a gsap product.

     

    11 minutes ago, aaronLejeune said:

    When my mouse is in the navigation component (Vue), everything works fine! When I enter the 'main' component, the scrollmotion start bugging...

     

    Sounds like you might have multiple scrollable containers. Have you tried viewing your project in Windows? You should be able to see all the scrollbars.

     

     

    • Like 2
  11. 5 hours ago, spassvogel said:

    are PRs about typings accepted?

     

    No. The main repo is private. If there's a problem with the typings, just raise an issue. And it looks like this has already been fixed in the next release.

     

    In the meantime, you can ignore the error.

    // @ts-ignore
    tl.seek("")

     

    Or augment the types in a d.ts file.

    declare namespace gsap.core {
      interface Timeline {
        seek(time: number | string, supressEvents?: boolean): this;    
      }
    }

     

    • Like 1
    • Thanks 1
×
×
  • Create New...