Jump to content
GreenSock

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

OSUblake last won the day on October 16

OSUblake had the most liked content!

OSUblake

Administrators
  • Posts

    7,265
  • Joined

  • Last visited

  • Days Won

    624

Everything posted by OSUblake

  1. I'm not familiar with anyone around here that uses Magento, so it might be hard getting help. You could always post in the Jobs & Freelance forum. But if you can write JavaScript files, then you could always just dynamically insert the GSAP files kind of like this, but maybe using the CDN urls instead. https://stackoverflow.com/a/22534608/2760155
  2. Welcome the forums @thei You really can't animate a filled path like a stroke. At least not directly. What you can do is animate a mask that traces over your path. @PointC has wonderful tutorial that goes over this technique. https://www.motiontricks.com/svg-calligraphy-handwriting-animation/
  3. Welcome to the forums @jxy What's barely working? And what can be done to make it better? CustomEase is a bonus to all registered users, as explained on the CustomEase FAQ, so you need to download the files from the installation page. React users include GSAP in a variety of different ways, but I'm going to assume you want the npm method. Please check out this video at around 2:50, it explains it better than I can in a forum post...
  4. Hi flim, Check out this post about immediateRender.
  5. Hi joris, Did you try it with setting pinSpacing to false? ScrollTrigger.create({ trigger: "#main-article", pin: true, pinSpacing: false, start: "bottom bottom", markers: true });
  6. OSUblake

    Multi-part slider

    Hi Jloafs, It looks like your video isn't working.
  7. That warning is from eslint and won't cause any problems. If you don't want to see the warning, add the eslint-disable-next-line comment above the array, or declare q inside your use effect. useEffect(() => { const q = gsap.utils.selector(...); }, []); Also, using logo1 as the selector context isn't going to work as it has no children. You should use a ref on the root element in your component. Please look at the examples provide above.
  8. Welcome to the forums @Design Geek Studio I have no idea how Magneto works, or what having authoring privileges even means in that context. Sounds like something you might want to bring up with your admin. But you really don't need to use requireJS as GSAP scripts are hosted on CDNs. https://greensock.com/docs/v3/Installation#CDN
  9. It looks like GSAP is setting the overflow when you resize, so you can just change it again onRefresh... A Pen by GreenSock (codepen.io)
  10. Hi dmckinght, It's better to create a new topic for such questions. Please look at the snap object in the ScrollTrigger docs. There is a duration value you can set.
  11. Welcome to the forums @Mehrus Using invalidateOnRefresh is the right approach, you just need use function based values to grab the correct value. Just some pseudo code. You will need to use your own calculations. .to(".foo", { y: () => innerHeight / 2 })
  12. Hi acantoro, You just need to add invalidateOnRefresh: true to your ScrollTriggers, and then use a function to grab the scale value. let heroTl = gsap.timeline({ scrollTrigger: { invalidateOnRefresh: true ... } }); heroTl ... .to(imageEl, { scale: getScale });
  13. Hi mark, Maybe you could apply some sort of gradient fade to those, kind of like this. https://codepen.io/austriker/pen/RqpdoO
  14. Hi jenda, You can definitely calculate stuff dynamically, but I'm not sure where you are expecting that code to go. Could you make a minimal demo showing where you want to use those values?
  15. I'd second that. Most of the v2 syntax will work in v3, and the rest is pretty easy to convert using our Migration Guide. If you must use v2, you would just import like every other plugin. The only difference is that there is no registration of the plugin, so you should add the plugin to a dummy value so it doesn't get dropped due to tree shaking. import { TweenMax } from "gsap"; import { ModifiersPlugin } from "gsap/ModifiersPlugin"; const plugins = [ModifiersPlugin]; TweenMax.to("#foo", 1, { x: 100, modifiers: { ... } })
  16. Hi romain, You will need to clamp the values before calling mapRange. Using pipe would be really good for this kind of thing. let transform = gsap.utils.pipe( gsap.utils.clamp(0.27, 0.5), gsap.utils.mapRange(0.27, 0.5, 1, 1.2) ); ... transform(0.2) // 1 transform(0.6) // 1.2
  17. Hi flim! You just need to add invalidateOnRefresh: true to your ScrollTrigger, and put the calculation inside the start function. ScrollTrigger will fire that function on refresh so you don't have to add resize listeners. GSAP ScrollTrigger.resize() (codepen.io)
  18. Welcome to the forums @fede I couldn't even get your demo to scroll to begin with, so there is no animation. I noticed that you are using a lot of older GSAP syntax, and would recommend checking out our Migration Guide. And for working with Lottie, I would recommend checking out our Lottie helper function. https://greensock.com/docs/v3/HelperFunctions#lottie Perhaps you can fork this demo and show your issue since we know this one works. https://codepen.io/GreenSock/pen/QWdjEbx
  19. You'd need to separate all those letters into different paths. Then you can just do a stagger on the opacity or display. You should set the initial state in your CSS. So for opacity, you'd set it to 0 in your CSS. gsap.to("#mySvg path", { opacity: 1, stagger: 0.1 });
  20. That demo is kind of old, and the API has changed a little since then. Instead of pathDataToBezier, you should use the MotionPathPlugin. And be sure to check out the Migration Guide for all the other changes.
  21. You can try to fix those fix with with npm audit, and learn more about what the issue is and if it's even worth worrying about. https://docs.npmjs.com/cli/v7/commands/npm-audit I don't put a lot of thought into those warning because it's nearly impossible to get rid of them. Especially if I'm just running stuff locally.
  22. Hi Midnight Gamer, I would recommend checking out our loop helper function for stuff like that. https://greensock.com/docs/v3/HelperFunctions#loop
  23. Like I mentioned above, GSAP has no dependencies, so those warnings are all for the React stuff. You can try to fix them, but it's unlikely you'll be able to get them all as create react app has a ton of dependencies. If you don't mind me asking, why did you choose React? We want to improve GSAP integration with React, so we're looking for feedback on how to improve that.
  24. You installed Create React App. 😉 Try installing it without React. GSAP has no dependencies.
  25. I'm on Windows too, but I've never had that problem. When I installed VS Code, I set the option to add it context menu so I can right click on a file to open it. But I rarely do that. I usually just create and edit the file within my project folder... If you still can't get it working, you should probably direct your problem to the VS Code team as they would be more knowledgeable on the subject.
×