Jump to content
Search Community

SJH

Premium
  • Posts

    40
  • Joined

  • Last visited

Posts posted by SJH

  1. If I remove the drawSVG call from JS, then the green check mark appears on screen because the mask's stroke color is set to "#ffffff". Because the mask is white everything underneath it will be fully visible. I don't want that. Here's the pen:

    See the Pen PoKyNga by sandalwoodsh (@sandalwoodsh) on CodePen

    I want the green check mark to be hidden i.e. not visible. So, I can set the stroke on the mask to "#000000". Now the check mark is hidden because the black mask is hiding everything. That's what I want. Here's the pen:

    See the Pen porxbVy by sandalwoodsh (@sandalwoodsh) on CodePen

    OK, so all I have to do is set the stroke color back to white (stroke: "#ffffff") when I call the drawSVG, but the result isn't what I expect:

    See the Pen MWvPeXb by sandalwoodsh (@sandalwoodsh) on CodePen

    There you go, I think this fully describes the issue I'm running into.

  2. I'm essentially using the same code as what I have here in codepen but I'm using it in Nuxt.js. I have a base card component with many <svg>s; with one of the <svg>s housing the check mark path. The problem is, on npm run dev, the check mark, appears on every card. I want the check mark hidden until the user has selected and closed each card. Any thoughts? Seems quirky.

    See the Pen OJjoGGm by sandalwoodsh (@sandalwoodsh) on CodePen

  3. It's working now. After I updated my Club Greensock account, I ran the npm install again: ./gsap-bonus.tgz from the command line. I checked the node_modules/gsap folder and the DrawSVGPlugin was listed. I guess it didn't work before because I had an expired ShockinglyGreen license. All seems good now. Thanks for you help OSUblake. Greensock has the best support. p.s. Thanks for your help too, Cassie.

    • Like 3
  4. Followed the instructions:  npm install ./gsap-bonus.tgz from https://greensock.com/docs/v3/Installation?checked=core,drawSVG#esModules

     

    Included the following code in my nuxt component:

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

     

    When I execute: npm run dev, I get a dependency was not found error. This actually makes sense to me because when I look inside my node_modules/gsap/dist folder "DrawSVGPlugin" doesn't exist.

     

    I was previously using the non member/non plugin version of GSAP, if that makes a difference.

  5. Anyone know how I could create a lens flare animation. Basically I want to have two streams of different colored lights emanating from a single point. It would be great if both streams of lights changed over time.

×
×
  • Create New...