Jump to content
GreenSock

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

Bounce with `config`

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.

 

Thoughts?

See the Pen by tahirahmed (@tahirahmed) on CodePen

  • Like 2
Link to post
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 post
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 post
Share on other sites

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 post
Share on other sites

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

Link to post
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.

×