bounce

Function
bounce(
    s1: State,
    s2: State,
    t_start: float,
    t_end: float,
    hold_duration: float = 0,
    num_transitions: int = 2,
    easing: dict[str, Callable[[float], float]] | None = None
) -> list[KeyState]

Bounce between two states.

Parameters

s1
First state (start and end)
s2
Second state (peaks)
t_start
Start time
t_end
End time
hold_duration
float | None — how long to hold the state in the in-between stages.
num_transitions
Number of transitions (3 = s1->s2->s1->s2) (4 = s1->s2->s1->s2->s1)
easing
Optional easing dict for transitions.