Skip to main content

Interface: SpringOptions

Defined in: src/rate-functions/spring.ts:19

Options for the spring rate function.

Use either the physical model (stiffness, damping, mass) or the simpler bounce model. If bounce is set, it wins over stiffness and damping.

Properties​

bounce?​

optional bounce: number

Defined in: src/rate-functions/spring.ts:30

Bounce in [0, 1). 0 gives no overshoot. Values near 1 give large overshoot. If set, this replaces stiffness and damping.


damping?​

optional damping: number

Defined in: src/rate-functions/spring.ts:23

Damping (friction) coefficient. Higher settles faster. Default 10.


mass?​

optional mass: number

Defined in: src/rate-functions/spring.ts:25

Mass on the spring. Higher is slower. Default 1.


restThreshold?​

optional restThreshold: number

Defined in: src/rate-functions/spring.ts:35

Settle threshold used to map physical time into [0, 1]. The spring reaches this distance from 1 at t = 1. Default 0.005.


stiffness?​

optional stiffness: number

Defined in: src/rate-functions/spring.ts:21

Spring constant. Higher is tighter. Default 100.