Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...

ZachSaucier last won the day on August 19

ZachSaucier had the most liked content!

ZachSaucier

Administrators
  • Content Count

    281
  • Joined

  • Last visited

  • Days Won

    5

ZachSaucier last won the day on August 19

ZachSaucier had the most liked content!

Community Reputation

529 Leader

3 Followers

About ZachSaucier

Contact Methods

Profile Information

  • Gender
    Male
  • Location
    USA
  • Interests
    Frontend development, soccer, board games, theology

Recent Profile Visitors

2,589 profile views
  1. Happy to help! I can't tell you how many hours I've wasted trying to debug what ended up being wrong variable names that are similar in JavaScript (like tl vs t1)... Sometimes it's good to just have another set of eyes
  2. Just switch it to use e.clientX and e.clientY like in Blake's demo https://codepen.io/GreenSock/pen/qBWqJyy?editors=0010 Happy tweening
  3. Hey bromel, fun request Welcome back! Using your method, I'd make use of a counter and GSAP's .invalidate() to do this. https://codepen.io/GreenSock/pen/XWrNxgg?editors=0010 The above will be much easier to do in the next version of GSAP! But it likely doesn't look like what you imagined because it's animating from one color directly to the next, which isn't exactly what Blake's pen is doing. To fix this and make it as smooth as Blake's demo it'd be better to use translation instead of directly animating the color stop values. You can do that by doubling the color stops and animating their offsets like so: https://codepen.io/GreenSock/pen/qBWqJxY?editors=0010
  4. Hey dada78, I believe that the main issue is that 'wght' 700 is not a valid value. You'd need to concatenate like so: 'wght ' + 700 However, GSAP doesn't really know how to animate this either as it's a string. I think most people animate variable fonts by using CSS variables. GSAP has a Quick Tip dedicated to animating those: There's also this demo animating a variable font using GSAP: https://codepen.io/osublake/pen/GPqQaB?editors=0010 But you can use font-variation-settings if you'd like to. You could even put it in an onUpdate and animate the fontWeight instead to have fallback support for browsers that don't support variable fonts, like so: https://codepen.io/GreenSock/pen/RwboYOy?editors=0010 Thanks for posting this question - I've been wanting to use GSAP with variable fonts and this was a good start
  5. If you strip it down to just the points it'd be helpful if you posted the demo back in this thread for others (like myself) to use I guess Jack may have a version like that somewhere in his chamber of secrets.
  6. Haha, if that's a joke, it's a good one given I don't see any membership associated with your account The support on these forums is free! We have a group of incredibly helpful volunteers who moderate the forums for the most part. So thank them for the help that they give!
  7. Hello superunknown and welcome to the forums, I don't think that's right. Your code is very close to what should work as far as I can tell. In fact, the tl.reversed() ? tl.play() : tl.reverse(); (notice the () after play - maybe that is your issue?) is exactly what I was going to suggest you try. To help you understand what it's doing, tl.reversed() is checking to see if the timeline is reversed. The ? operator is essentially a shorthand for an if statement where the part before the : is if reversed() returns true and the part after is if it returns false. It could be rewritten as: if(tl.reversed()) { tl.play(); } else { tl.reverse(); } With that being said, it's hard to tell exactly what is going awry. If the above doesn't fix your issue, could you please create a minimal demo of your issue in a CodePen? The below thread provides more information on how to do so.
  8. Maybe Jack's explanation here can help make the differences more clear. If there are particular points of confusion about the two, please let us know! We're happy to help.
  9. Hey 31its and welcome to the forums, Given the very hand-drawn, styled nature of your animation, I might actually recommend that you use a PNG sprite animation instead of DrawSVG (though DrawSVG is great for this sort of animation, it's hard to do that style of drawing in SVG). You can read more about how to do that with GSAP in the threads below. Let us know if you run into anything you can't figure out!
  10. You could modify the demo that you linked to remove the line functionality. I quickly commented out some lines to produce this, but you could probably strip a little bit more logic if you'd like to (especially in relation to the controls). https://codepen.io/GreenSock/pen/NWKbadW?editors=0010
  11. In addition to the great advice from Craig, if you could post a minimal version of your issue online to a site that we could access we might be able to help more with debugging.
  12. Hopefully not In almost all cases it's best to load more content when it's needed, not load it all at the start. Keep us updated! Page transitions are fun when done right.
  13. ZachSaucier

    Harley

    Hello Harley and welcome to the forums. Could you please recreate a minimal demo recreating your issue in something like a CodePen? The below thread should provide more info on how to do so and the below demo should help get you started. https://codepen.io/GreenSock/pen/xxKEmML
  14. This sounds like you're talking about a "medium" sized website which can be a little awkward to handle because there's definitely not a "right answer" and a lot of it boils down to preference. When I see this type of situation, I immediately think: what needs to be loaded on every page (the overall framework) and what is more so specific to certain pages. Then I personally would put the general stuff in its own JS file, etc. and load page-specific JS files as needed. I may or may not use a static site generator to do this (it depends on the nature of the site). Another person might do roughly the same thing but use a component based framework to do so (which is essentially a more complex static site generator). It boils down to 1) what are your needs, 2) what are you most comfortable using, and 3) what sort of timeline are you working on (because if time doesn't matter so much you can play around with different ways or teach yourself a new way, etc.).
  15. Now that's a big question, haha. You could start by looking at Chrome's developer resources like this article. But I recommend just creating a minimal demo for us to view the issue as we're much more likely to be able to help quickly in figuring out exactly what's happening
×