Jump to content
Search Community

robbutz

Premium
  • Posts

    3
  • Joined

  • Last visited

About robbutz

Contact Methods

Profile Information

  • Location
    Saskatoon
  • Interests
    nonprofits, web dev, science fiction, movies, books, activism, barricades

robbutz's Achievements

  1. I think I'm very close to following this. I've deployed it on a simpler example, where a ball just bounces along a platform. (It does some calculations to figure out the distance of the initial descent from where the ball is to the top of the platform). https://codepen.io/oxygensmith/full/gOZMZvx/ede29a5de989d3a624c85d5798ba87e1 So far this works pretty well! It feels like there's slightly unrealistic glide at the top or speed of descent in some cases but I think I have to fiddle with duration values and eases. I should probably make my own customBounce function that passes initial values to a three-step bounce timeline, adds each of these timelines to the main timeline, and maybe decays the values or something with each bounce. Thanks for your help Jack and Rodrigo. Any further suggestions are welcome!
  2. Tried it. I'm not sure if CustomBounce is applicable to my situation because the X must move at the same time as a Y, so that the bounces wouldn't be straight up and down, but arcs. Here was my attempt: https://codepen.io/oxygensmith/pen/oNJLoWm/140df32beec540052a80e95c3230489c Are there lesser-known parameters in the CustomBounce that could deal with this? I am going to try Jack's approach in a moment. Thanks!
  3. 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
×
×
  • Create New...