BounceShaper::setDecay()
Description
Sets the decay of the bounces. The decay specifies how high the next bounce should be in relation to the current bounce. For example if decay is set to 1/3 (the default) and the first bounce reaches a peak of 1, the next bounce will reach 1/3rd, and the next will reach 1/9th, etc.
Example
import megamu.shapetween.*;

BounceShaper bounce;
Tween ball;

void setup(){
  size(200,200);
  ball = new Tween(this, 1);
  ball.setPlayMode( Tween.REPEAT );
  bounce = new BounceShaper();
  ball.setEasing(bounce);
}

void draw(){
  background(255);
  
  for( int i=50; i<150; i++ )
    point( i, 50 + bounce.shape( norm(i,50,150) )*100 );
  
  ellipse( 100, lerp(30, 190, ball.position()), 20, 20 );
}

void mouseMoved(){
  bounce.setDecay( norm(mouseX, 50, 150) );
}
Syntax
setDecay(howMuch)
Parameters
howMuch
float: The amount of decay from 0 to 1
Related
getDecay()
BounceShaper