Jump to content

Tahir Ahmed

Bounce with `config`

Moderator Tag
Go to solution Solved by GreenSock,

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

I was wondering if there should be a config available for Bounce ease as well like the ones that are available in Elastic as well as Back eases.


The use-case for example is to control the number of bounces as well as the amplitudefor lack of a better word i.e. the force with which it bounces back everytime it hits the floor.


Example: jsFiddle.



See the Pen by tahirahmed (@tahirahmed) on CodePen

  • Like 2
Link to comment
Share on other sites

Very simple decay...

See the Pen RNZmEO by osublake (@osublake) on CodePen


A better way to calculate it...

var amplitude = 90; 
var decay = 0.5; 
var freq = 1; 

y -= amplitude * Math.cos(freq * time * 2 * Math.PI) / Math.exp(decay * time);

  • Like 5
Link to comment
Share on other sites

The configurable Bounce is a great suggestion. We have a long feature-list for easing enhancements and just need to find the time.

  • Like 3
Link to comment
Share on other sites

  • Solution

Yeah, it's a good suggestion Tahir. We've had some longer-term plans that will address this (and a lot more), but it's not a small undertaking. If you're patient, I think you'll be really pleased with what we eventually come up with :)

  • Like 1
Link to comment
Share on other sites

@Jack, good to hear that. I'll wait of course :)

Link to comment
Share on other sites

  • 2 years later...

Three years later, wondering whether there's been any progress on this front?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.