// `b` returns an altereted version of `t`, with the // bounce logic applied. constbounced = b(t);
dampen parameter allows velocity to be dampened with each bounce. A value
of 0.9 for example reduces velocity by 10%. A value of 1.1 will increase velocity by
10% with each bounce.
constrainBounce
yields a function that affectst
's position and velocity such that it bounces within bounds.dampen
parameter allows velocity to be dampened with each bounce. A value of 0.9 for example reduces velocity by 10%. A value of 1.1 will increase velocity by 10% with each bounce.