Hey GSAP friends,
Apologies for this really basic question in advance. I'm trying to handle a very simple animation, a ball bouncing down the stairs. My question is more about how you would approach this problem in GSAP more so than the technical how-to.
Obviously, one way to handle a bounce is to use the Motion Path plugin. That gets it going down the stairs, but... the ball doesn't really have the realistic "speed up as the ball is falling, launch up quickly after the bounce, lose speed, reverse direction, speed up on the way back down" that you expect of a "bounce."
So I know that you can play with the values in a customEase plugin, but... that seems like you have to do 200 trial and errors to make a ball accelerate as it heads toward a bounce, and decelerate as it bounces up. And then if you need to change anything (like add a bounce), you'd have to tweak your ease all over again.
Essentially, what I'm looking for would be a "powerX.inOut" ease in each arc of the bounce (accelerate up, slow down in middle of arc, accelerate down).
So my question is: how would you handle it? is there a more sophisticated way to deal with a bounce motion?
-- just use 'ease: "bounce"' and transform the ball's X as you do so?
-- break the motion path into multiple paths and position them next to each other, then have the ball follow multiple motion paths, to which you apply powerX.inOut?
-- use the physics2D plugin to manage the motion of the ball? (this, I am less familiar with)
Thanks, I'm grateful to hear anyone's approach to this problem. I'm interested in a method that would give me the most flexibility and ease of making changes if the motion of the ball has to change at some point.
Rob