BackShaper::setAnticipation()
Description
Sets the anticipation (number greater than 0) as a peak motion backwards before follow through. If you set anticipation to 0.3, the Tween would move from 0 to -0.3 to 1.
Example
import megamu.shapetween.*;

BackShaper back;
Tween punch;

void setup(){
  size(200,200);
  punch = new Tween(this, 0.5);
  punch.setPlayMode( Tween.REVERSE_REPEAT );
  back = new BackShaper();
  back.setAnticipation( 0.6 );
  punch.setEasing(back);
}

void draw(){
  background(255);

  line( 160, 20, 160, 180 );
  ellipse( lerp(75, 150, punch.position()), 100, 20, 20 );
}
Syntax
setAnticipation(howFar)
Parameters
howFar
The amount of anticipation
Related
getAnticipation
BackShaper