Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 | 1x 1x 10x 10x | /** Damped sinusoidal oscillation — used for spring snap-back and shake effects */
export function decayingSin(t: number, freq: number, decay: number): number {
return Math.sin(t * freq * Math.PI * 2) * Math.exp(-t * decay)
}
|