spring
Summary
Create a spring-physics animation iterator for CSS transitions and WAAPI.
The returned iterator can be:
- Iterated to get position values (0→1)
- Spread into WAAPI options:
element.animate(keyframes, { ...spring() }) - Stringified for CSS:
`transform ${spring()}`
Signature
const spring: SpringFunctionExample
// Named preset
let s = spring('bouncy')
element.style.transition = `transform ${s}`