Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by Dennyno

  1. Dennyno

    Svg morph fixing

    Hey! Thanks @alig01 I was playing with your code, but seems bit hard to inject also scrolltrigger and have each function working together. btw.. thanks for your time gsap.registerPlugin(MotionPathPlugin, ScrollTrigger); MorphSVGPlugin.convertToPath("circle, line"); let roundtext = document.querySelector("#textPath"); let masterTl = gsap.timeline({ scrollTrigger: { trigger: "body", // or whichever element you want to listen for scroll events on start: "top top+=20", // animation starts when top of your trigger hits the top of the viewport end: "bottom bottom", // animation ends when bottom of your trigger hits the bottom of the viewport scrub: true, // enables scrubbing markers: true // Optional, shows markers where animation starts and ends } }); let tl = gsap.timeline({ defaults: { ease: "none", duration: 5 } }) .to(roundtext, { attr: { startOffset: "50%" } }); masterTl.add(tl); let tl2 = gsap.timeline({ repeat: -1 }) .to("#text", { rotate: -360, transformOrigin: "50% 55%", ease: "none", duration: 20 }); masterTl.add(tl2);
  2. Dennyno

    Svg morph fixing

    Hi all. How can I achieve the following complex result: the text path should start as already does (from left, following masterPath), then entering in the circle path, then the text should play endless inside that circle with a new infinite timeline. Basically I can make an hidden element and show it onEnd, but I guess there should be any clever gsap solution to morph the text path from the main one, to the circular one; then finally the image should appear. Thanks for any help
  3. Also my section height is 650vh (tested also more), but 1) the text is not even appearing 2) the phone svg is being cut but I guess it's already pinned too inside the parent section. Basically seems that flex-start breaks the whole code, while basically need to put that phone + images grid left aligned at then end of it's animations Btw, thanks for any help 🫶💚
  4. Hi Yep I partially solved, right while I was posting here. But.. the text inside the pinned animation has gone away...
  5. Starter point https://codepen.io/DedaloD/full/poQyvPp As it seems also the next has gone from the above one
  6. Hi guys, which could be the solution to allow me viewing previous and next sections before and after the animated one? I got a pinned element, but need to pin it only when required (more as sticky, intead of fixed). EXAMPLE: A, B and C should not overlap the animated grid... Thanks
  7. Dennyno

    invalid morph to

    Other related question: why MorphSVG gives error on the following path, saying that #dashedline is malformed? <svg id="connect-svg" viewBox="0 0 600 1200" xmlns="http://www.w3.org/2000/svg"> <defs> <mask id="theMask" maskUnits="userSpaceOnUse"> <path id="dashedline" class="theLineFull" d="m 157.895 241.085 c 62.561 116.897 125.079 109.776 231.114 78.452 c 287.882 -85.044 218.659 252.607 92.469 182.304 c -297.336 -165.652 -408.952 -5.205 -349.65 134.907 c 18.98 44.844 52.093 45.918 87.291 22.143 c 33.356 -22.531 13.046 -93.807 -23.654 -106.86 c -240.436 -85.514 -209.354 143.18 -51.712 160.189 c 220.7 23.813 19.633 358.903 -114.115 347.002" fill="none" style="stroke:hwb(0deg 100% 0% / 70%)" stroke-linecap="round" stroke-miterlimit="10"></path> </mask> </defs> <g mask="url(#theMask)" class="theLine"> <path d="m 157.895 241.085 c 62.561 116.897 125.079 109.776 231.114 78.452 c 287.882 -85.044 218.659 252.607 92.469 182.304 c -297.336 -165.652 -408.952 -5.205 -349.65 134.907 c 18.98 44.844 52.093 45.918 87.291 22.143 c 33.356 -22.531 13.046 -93.807 -23.654 -106.86 c -240.436 -85.514 -209.354 143.18 -51.712 160.189 c 220.7 23.813 19.633 358.903 -114.115 347.002" fill="none" style="stroke:hwb(0deg 100% 0% / 70%)" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="5" stroke-width="1" stroke-dasharray="10"></path> </g> <circle class="ball ball01" r="6" cy="220.572" cx="150" fill="#fff"></circle> </svg> Thanks
  8. Dennyno

    invalid morph to

    Hey @GreenSock Jack, solved banally with a Scrolltrigger condition Thanks https://codepen.io/DedaloD/pen/xxyWojJ
  9. Dennyno

    invalid morph to

    Hi all, the following code works smoothly (I guess so), but I think there's an issue somewhere because randomly I got a huge an annoying WARNING: invalid morph to: #ra-yt-ad WARNING: invalid morph to: #ra-bf-ad WARNING: invalid morph to: #ra-mac-screen Could it be caused by the prefetch links I got in header? Any hint how to fix this? (Using Barbajs it takes no-time to have a long error log). I tag @Carl as I bet he could have an easy solution for svg related stuff - but I'm open to any help :P
  10. Yep, I'll quitely wait here I spent the whole week looking for something gsap related and did some tests.. basically the splitTexted texts are draggable, but even setting absolute position and display:block... nothing works on my side, also inside GSAP Codepen's... seems that Draggable and Physics2D plugin (specially the second one) showcases... seems "abandoned" with the few demos available. I'm joking 😅 btw I found nothing that could fit
  11. Hi all, starting from this example basic pen and @OSUblake one https://codepen.io/osublake/pen/LxabRP/a820ab5bf748b4d1f45083edb2a0843f is possible to achieve the same as https://codepen.io/gayane-gasparyan/full/LYJEoZM falling and draggable words with collision bouncing event? Is something GSAP could do, even not being a 2D canvas engine?
  12. Thanks a lot for clarifying @GreenSock ! This is a game changer for many animations then, this API needs to be more highlighted. Talking about the matchmedia I'll def use it, comes handy
  13. Hi @GreenSock this way? function parallaxMoveDesk() { const gyros_container = document.querySelector('.container-gyro'); if (gyros_container) { const gyros = gyros_container.querySelectorAll('.figure-img_gyro'); const movementRange = 30; gyros_container.addEventListener('pointermove', e => { const relX = e.clientX; const relY = e.clientY; gyros.forEach((gyro, index) => { const movement = (index % 2 === 0 ? movementRange : -movementRange) * 0.01; const moveX = (relX - window.innerWidth / 2) * movement; const moveY = (relY - window.innerHeight / 2) * movement; gsap.quickTo(gyro, { xPercent: -moveX, yPercent: moveY, duration: 0.3, // Use a shorter duration ease: 'power2.out' }); }); }); } } On the other pen you can see anything as it's inside a codepen iframe and needs grant on mobile to use gyroscope, btw I solved thanks This code using quickTo seems not working (or am I missing something?)
  14. EDIT: The issue in on the second pen. Seems url are reversed 😅 Just to know if is there any performance boost I may add or fix? Using gsap quicksetter might be a game changer? Also I am finding issue while merging this pen with another one to use acceletometer values, any help into that route? Using CSS values or setting attributes, everything someway works, but from my side, using GSAP I see nothing moves. Do I need maybe, to fetch first the device alfa, beta and gamma values before loading gsap? https://codepen.io/DedaloD/pen/dyqaBrK Maybe the problem is that I need first user permission, and this may get issues with gsap values?
  15. Oh Gosh! Thanks a lot! My today's saver. I was randomly trying crazy things like starting:bottom bottom-200, ending bottom-200 top.. lol... Really thanks, your solution is even better from what I've been looking for
  16. Hi @mvaneijgen, this pen may render better the idea https://codepen.io/GreenSock/pen/MWmVwpX, exactly the opposite effect of this current pen... Im blocked also with the positioning values. Need to show the red part a little, then "swipe" one card at time via scrolltrigger. I can remove the sticky position and pin the cards, but... where to pin them to achieve the result? Bottom? (I thinking like reversing the demo pen which works pinning on top). This can we easily achieved using something like Swiperslider o any slider framework, but I prefer bangin my head and trying a GSAP solution Yep the red part si the trapeze I meant, lol... 😂 Thanks a lot
  17. Hi all, I'm blocked to achieve the opposite animation of this pen https://codepen.io/davedublin/pen/dyeYdRK : Need to start each card smaller from the above one, (like a reverse trapeze / cone to give you the idea of the overall shape), then scale a card below, when its previous sibling one has gone (gonna handle values latelly.. actually just need to understand). Tried all day with no luck... I guess I can go for 4 custom animations for each card, but I bet there may be a loop solution for a stupid thing like this. Actually exactly the opposite of many demo I've seen... and sadly I'm using position sticky (maybe making the solution harder). Thanks for any help here.
  18. Or basically use Observer to get z-index values, the highest one it always the middle one. This is the same, using gsap.ticker const listItems = document.querySelectorAll('.list-container li'); let highestZIndexItem = null; function updateHighestZIndexItem() { const newHighest = Array.from(listItems).reduce((highest, item) => { return parseFloat(item.style.zIndex) > parseFloat(highest.style.zIndex) ? item : highest; }); if (newHighest !== highestZIndexItem) { if (highestZIndexItem) highestZIndexItem.classList.remove('highest-z-index'); highestZIndexItem = newHighest; highestZIndexItem.classList.add('highest-z-index'); } } gsap.ticker.add(updateHighestZIndexItem); I used this quick solution once, as I didn't want to make another carousel my own.. and simply I used the one provided by the examples. Tbh, there are many better ways, as @Cassie said EDIT: on the second example, should be good going by size intead, as there's no z-index diff
  19. Hi @Cassie thanks Will get a look there then. Thanks PS so nice the new profile pic!
  20. Hi all, how to achieve a smooth scroll on this layout? I did cut away scrollsmoother as the layout I am working might had problem and I'd had to change lot of this. Basically need to smoothscroll only on the part/page where I have this design, as using only scrolltrigger seems a bit buggy. Gonna test scrollerproxy, but never used that. Thanks for any help
  21. Thanks a lot @GreenSock Jack! In case, to make the animation start once, then freeze till user do something, shall I add another timeline? Or do you think sould be better, basically to duplicate this one and use 2 events? Thanks again for the hint