Jump to content
GreenSock

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

gareth

BusinessGreen
  • Posts

    96
  • Joined

  • Last visited

About gareth

Recent Profile Visitors

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

gareth's Achievements

  1. I am trying to animate type along a svg path. Thanks to some help from demos on this forum, I am very close to the effect I am after. The problem I have is the kerning (space between each letter ) is messed up. I understand this is because I am not allowing for the individual character widths within my start and end positions. Is it possible to access these within the forEach loop?
  2. I am trying to blend a linear gradient fill of a svg so it cycles through a few colors. The gradient looks how I want, but the tween feels very choppy. I know this is because of the way I have used stagger, but not sure what approach to take to make is color change smoother, but still have the gradient change from left to right?
  3. yes, sorry that's what I meant.
  4. very cool, thank you - did not know you could loop a tween in a forEach like that.
  5. @ZachSaucier Thank you for taking the time to explain how to code more efficiently with gsap, this is what I ended up with: const colors1 = ['#ffae65', '#ffd898', '#acaf9d']; const colors2 = ['#110029', '#f61317', '#ffa600']; const colors3 = ['#ffb72f', '#e1ceb7', '#8199ac']; const colors4 = ['#ffb72f', '#e1ceb7', '#8199ac']; const colors5 = ['#ffb075', '#ff8c73', '#e0508c']; const colors6 = ['#ffb075', '#ff8c73', '#e0508c']; const colors7 = ['#00f050', '#00f050', '#00f050']; const gradTl = gsap.timeline({defaults: { duration:1, stagger:.2,ease:"Power4.inOut" } }); gradTl.to("#gradient stop", {keyframes: [ {stopColor: (i) => colors1[i]}, {stopColor: (i) => colors2[i]}, {stopColor: (i) => colors3[i]}, {stopColor: (i) => colors5[i]}, {stopColor: (i) => colors6[i]}, {stopColor: (i) => colors7[i]} ]}); gsap.from("#sun", 10, {y:200,ease:"Power4.inOut"}) The bit I am still unsure of is how to loop through the colors arrays in a timeline tween.
  6. thanks! this helped me a lot: https://codepen.io/garethj/pen/dyOXBQK
  7. I am trying to transition a fill of a svg shape through a few different gradients. At the moment I have it working so the shape changes to the same new color for each stop, but is it possible to change each stop color independent ? Thanks!
  8. I have a site with ajax page loads (using highway js). On one of the pages I have a looping timeline tween. Should I try and kill this tween on page exit or is it killed anyway because the elements are removed from the dom? I reinitialise it on each page visit.
  9. ok wow, so simple - thank you !
  10. Is it possible to refresh random values on every repeat of a timeline? I have the the random values on each tween creation, but it just loops the same values.
  11. thanks so much for having a go at this, but I actually meant the amount of drag it takes to go the next snap point. In my demo you will see you have to drag the next div past the red line or it snaps back, I was hoping you could move halfway towards the line and then it would snap forward.
  12. I have a x draggable with snap points working well, but is it possible to change where the snap is triggered from ? At the moment you have to drag past the central red line in my demo, I would like to trigger the snap forward earlier - 50% from the line.
  13. Is there anyway to add a pause between paragraphs when animating a splittext timeline?
  14. ah neat! thanks working great.
×