Jump to content

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

Carl last won the day on January 3

Carl had the most liked content!


  • Content Count

  • Joined

  • Last visited

  • Days Won


Carl last won the day on January 3

Carl had the most liked content!

Community Reputation

9,720 Superhero

About Carl

  • Rank

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

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

  1. To add to @GreenSock's excellent advice... The ease curve (Power4) you chose gets very flat at the end making the rate of change so small that it appears the animation has delayed. This video should help you understand how ease curves work If you want to reset the position of the h1 after it moves to the right, this is a great time to use a timeline. A timeline allows you to sequence multiple animations. With a timeline you can add a set() to a timeline to set the h1's position back to 0 https://codepen.io/snorkltv/pen/rNMEoNz?edi
  2. You have an additional semi-colon ; after stagger:0.6; which is causing an error. It isn't necessary to use opacity and autoAlpha in the same tween. I'm not sure why you switched to using TimelineMax in the second demo. I would recommend sticking with the new gsap.timeline(). If you are still beginning with GSAP3 you may find my free course helpful (see signature)
  3. Paul's solution above may be all you need and works great. In B-sides, Bonuses, and Oddities I have a lesson (with 20 minute video) that shows how to build a re-usable counter effect that makes chaining these types of animations a breeze. Here is the finished demo https://codepen.io/snorkltv/pen/NWRqmOv?editors=0010 Once the effect code is registered you can animate a counter with one line like tl.counter("#studentsCount", {end:1860, increment:10}) the effect reads the current value in the target html item ("#studentsCount"), an
  4. this demo should help https://codepen.io/snorkltv/pen/JjowpLO
  5. Hi AdulTSU, This is an interesting challenge and not too tricky with GSAP, but it does require knowing some of the finer nuances of the API. Please see this video on placing repeat in the stagger object vs placing it on a timeline or tween I was able to get what you want pretty close I think with this approach https://codepen.io/snorkltv/pen/BaLMJYP?editors=0010 The blog post below contains a lesson from my course GSAP3 Beyond the Basics which shows how to get rid of any pause between repeats https://www.snorkl.t
  6. Hi Romann, You can add or remove callbacks after a timeline is created (or whenever you want) using eventCallback and optionally pass in parameters. Someone else may have a better idea regarding then() as i'm not very familiar with it.
  7. Hi, This effect was literally the most recent lesson I added to my GreenSock course bundle. To split the text and animate character by character I would suggest SplitText. To make the text appear that it is coming from an invisible div as you said the trick is to give the parent div overflow:hidden in the css. Below is the demo from the lesson. Feel free to pull it apart https://codepen.io/snorkltv/pen/XWjZMgJ You probably want to pay attention to what is happening to the "h2" and ".tagline" Change the yPercent value to 100 (positive)
  8. Hi Shehzad, So glad you found a solution and better understanding from the solutions presented here and the course. When you put a duration in the defaults it will apply to every tween. But the engine properly ignores that for set() which will always have a duration of 0. This is proper because you could want every tween in a timeline to have a default duration and still be able to use a set() with a 0 duration. A set() has a very specific purpose: to apply values instantly. If you want to have a default duration, use to() or from() tweens h
  9. Hi Shehzad, Thanks for the demo. For something like this I would remove the ScrollTrigger code entirely and make sure the timeline plays fine on it's own. If you do that you will see that your timeline doesn't play. The reason for this is because you do not have any animation in your timeline. You are only putting a bunch of set() calls in the timeline. A set() is literally a tween with 0 seconds as the duration. Since there is no duration to each set(), each set() gets added at a time of zero and your timeline has a duration of 0 sec
  10. Hi @UbiAssassin So glad to hear that you are having success with registerEffect() I suspect you ran across my video I regularly post about this on twitter as it's one of my favorite features and I feel that it is being under-utilized by the community. It's really cool to hear you have made it a part of your workflow and you are experiencing the flexibility and time-saving features. It's important to note that @GreenSock is the brains behind bringing it into existence and of course @ZachSaucier is a big part of
  11. Carl

    Return a value

    i don't know anything about paper or alpine but you can have your onUpdate function apply object.value to the text.content your private pen wasn't forkable so paste this code function data() { var object = { value: 0 }; return { init($refs) { this.$nextTick(() => { function words(object) { gsap.to(object, { value: 20, duration: 5, snap:{value:1}, onUpdate:changeNumber }); } console.log(words(object)); paper.setup($refs.canvas); var path = new paper
  12. As Zach said, there really is quite a bit that goes into this that isn't directly tied to GSAP. GSAP's only role is really going to be a small matter of animating the width, scale, or opacity of a few things. The majority of the trouble is going to be with the css layout you choose and programming the logic for the opening and closing of certain elements. below is a very basic example of how you can use a loop to target different things and apply the same animation to them. Each expander element has animation that increases it's width and reveals a close button. The animation plays
  13. when I want a bunch of things to move with random values for duration, repeatDelay, and end values I'll create a function that creates a tween for any element that is passed into the function. When the tween is done I pass the target of the tween back into that function using onComplete and onCompleteParams. In the example below I loop through all my bugs and pass them into the moveMe() function. https://codepen.io/snorkltv/pen/GRjqbjN?editors=0010 Using this same approach you have a ton of flexibility to add things like "rotate to new direction" and "consta
  14. Hi @monema I guess which approach you choose will depend on your needs but a few things to clarify adding a pause() inside a function inside a timeline isn't accurate and can cause problems when reversing (which is why addPause() was created) If you want to put a bunch of conditional logic inside the timeline that is synchronized with a pause its probably better to use addPause() with a callback tweenTo() and tweenFromTo() don't require any calculation of duration which is a big part of their convenience. tweenTo() and tweenFromTo() allow callbacks just like any tween
  15. Hi, this is a perfect use case for tweenTo() or tweenFromTo() Video below should help Docs for tweenFromTo()