Jump to content
Search Community

szabkel

Members
  • Posts

    6
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

szabkel's Achievements

0

Reputation

  1. @JJWWhat @ZachSaucier suggested works. You can just deconstruct the function argument. require(['gsap', 'ScrollTrigger'], function ({gsap}, {ScrollTrigger}) {...
  2. @ZachSaucier Thanks, I did not know about that! GSAP works as intended, sorry about this.
  3. Sorry, I accidentally fixed it... It works If I call with gsap.gsap.registerPlugin(...)
  4. Okay, maybe I am just retarded, but requirejs adds an alias? I can use the objects like this: require(['https://cdnjs.cloudflare.com/ajax/libs/gsap/3.3.1/gsap.min.js', 'https://cdnjs.cloudflare.com/ajax/libs/gsap/3.3.1/ScrollTrigger.min.js'], function (GreenSocks3, St) { const gsap = GreenSocks3.gsap; const ScrollTrigger = St.ScrollTrigger; console.log(gsap); console.log(ScrollTrigger); gsap.registerPlugin(ScrollTrigger); });
  5. I have to load GSAP 3 with RequireJS (from a Magento 2 frontend). GSAP 2 worked without a problem, however I can't do the same with version 3. If I use the CDN paths inside the require config paths key, I get an error: TypeError: gsap.registerPlugin is not a function Or I get Error: Script error for "gsap/gsap.min" https://requirejs.org/docs/errors.html#scripterror require.min.js:1:1795 Error: Script error for "ScrollTrigger/ScrollTrigger.min" https://requirejs.org/docs/errors.html#scripterror Should be something trivial, but It drives me crazy, please help. Thank you very much Edit.: A tried a lot of solutions posted in the forum, but non of the examples were for version 3 and they usually just use TweenMax..etc.
  6. Hello! I am totally new to greensock and animation in general, so bear with me. I started messing around with SVG path morphing and don't know how to solve the problem with this one.: I got an svg from flaticons and loaded it into AI, added a few arrows and a single path which they should follow. Without pressing any buttons, the arrows seem to always go back to their start position without any additional animation, but If I press any of the speed buttons, the arrows start to animate from their end position to their start before even beginning the loop, making this kind of unintended animation back to the start position. I expected them to "teleport back" to their start before each loop. Why does this happen? Thanks for you help! air-filter.svg
×
×
  • Create New...