缓动函数指定随时间变化的速率,在使用 Svelte 的内置转场和动画以及补间和弹簧实用程序时非常有用。 svelte/easing
包含 31 个命名导出、一个 linear
缓动和 10 个不同缓动函数的 3 个变体: in
、out
和 inOut
。
英Easing functions specify the rate of change over time and are useful when working with Svelte's built-in transitions and animations as well as the tweened and spring utilities. svelte/easing
contains 31 named exports, a linear
ease and 3 variants of 10 different easing functions: in
, out
and inOut
.
英You can explore the various eases using the ease visualiser in the examples section.
ease | in | out | inOut |
---|---|---|---|
back | backIn |
backOut |
backInOut |
bounce | bounceIn |
bounceOut |
bounceInOut |
circ | circIn |
circOut |
circInOut |
cubic | cubicIn |
cubicOut |
cubicInOut |
elastic | elasticIn |
elasticOut |
elasticInOut |
expo | expoIn |
expoOut |
expoInOut |
quad | quadIn |
quadOut |
quadInOut |
quart | quartIn |
quartOut |
quartInOut |
quint | quintIn |
quintOut |
quintInOut |
sine | sineIn |
sineOut |
sineInOut |