缓动和时长:令牌与规格
缓动和时长协同营造出响应迅速、富有表现力的动效
TIP
在 Expressive 更新中,组件和动效现已采用基于弹簧物理模型的动效物理系统。各产品应迁移至新系统。缓动和时长系统仍可用于过渡动效。尚未升级至 GM3 Expressive 的团队仍可使用该系统,但该系统已不再维护。
设计令牌
动效中的缓动和时长可通过缓动与时长令牌实现。进一步了解设计令牌
| Token | 取值 |
|---|---|
| Motion spring fast spatial | damping 0.9, stiffness 1400 |
| Motion spring fast effects | damping 1, stiffness 3800 |
| Motion spring default spatial | damping 0.9, stiffness 700 |
| Motion spring default effects | damping 1, stiffness 1600 |
| Motion spring slow spatial | damping 0.9, stiffness 300 |
| Motion spring slow effects | damping 1, stiffness 800 |
缓动
强调缓动组
该组最常用,因其体现了 M3 的表现力风格。
| 信息/平台 | 强调缓动 | 强调减速缓动 | 强调加速缓动 |
|---|---|---|---|
| Token | md.sys.motion.easing.emphasized | md.sys.motion.easing.emphasized.decelerate | md.sys.motion.easing.emphasized.accelerate |
| Android | pathInterpolator(M 0,0 C 0.05, 0, 0.133333, 0.06, 0.166666, 0.4 C 0.208333, 0.82, 0.25, 1, 1, 1) | PathInterpolator(0.05f, 0.7f, 0.1f, 1f) | PathInterpolator(0.3f, 0f, 0.8f, 0.15f) |
| CSS | 不适用(使用标准缓动作为回退) | cubic-bezier(0.05, 0.7, 0.1, 1.0) | cubic-bezier(0.3, 0.0, 0.8, 0.15) |
| Flutter | easeInOutCubicEmphasized | Cubic(0.05, 0.7, 0.1, 1.0); | Cubic(0.3, 0.0, 0.8, 0.15); |
| iOS | 不适用(使用标准缓动作为回退) | ControlPoints:0.05f:0.7f:0.1f:1.0f | ControlPoints:0.3f:0.0f:0.8f:0.15f |
| After Effects | 使用 After Effects Easing Panel(下载) | ||
标准缓动组
该组用于简单、小型或偏功能性的过渡。
| 标准缓动 | 标准减速缓动 | 标准加速缓动 | |
|---|---|---|---|
| Token | md.sys.motion.easing.standard | md.sys.motion.easing.standard.decelerate | md.sys.motion.easing.standard.accelerate |
| Android | PathInterpolator(0.2f, 0f, 0f, 1f) | PathInterpolator(0f, 0f, 0f, 1f) | PathInterpolator(0.3f, 0f, 1f, 1f) |
| CSS | cubic-bezier(0.2, 0.0, 0, 1.0); | cubic-bezier(0, 0, 0, 1); | cubic-bezier(0.3, 0, 1, 1); |
| Flutter | Cubic(0.2, 0.0, 0, 1.0); | Cubic(0, 0, 0, 1); | Cubic(0.3, 0, 1, 1); |
| iOS | ControlPoints:0.2f:0.0f:0.0f:1.0f | ControlPoints:0.0f:0.0f:0.0f:1.0f | ControlPoints:0.3f:0.0f:1.0f:1.0f |
| After Effects | 使用 After Effects Easing Panel(下载) | ||
时长
短时长
这些时长用于小型、偏功能性的过渡。
| Token | 值 |
|---|---|
md.sys.motion.duration.short1 | 50ms |
md.sys.motion.duration.short2 | 100ms |
md.sys.motion.duration.short3 | 150ms |
md.sys.motion.duration.short4 | 200ms |
中等时长
这些时长用于跨越屏幕中等区域的过渡动效。
| Token | 值 |
|---|---|
md.sys.motion.duration.medium1 | 250ms |
md.sys.motion.duration.medium2 | 300ms |
md.sys.motion.duration.medium3 | 350ms |
md.sys.motion.duration.medium4 | 400ms |
长时长
这些时长通常与强调缓动搭配,适用于大型、富有表现力的过渡效果。
| Token | 值 |
|---|---|
md.sys.motion.duration.long1 | 450ms |
md.sys.motion.duration.long2 | 500ms |
md.sys.motion.duration.long3 | 550ms |
md.sys.motion.duration.long4 | 600ms |
超长时长
虽然少见,但部分过渡会使用超过 600ms 的时长。此类时长通常用于不涉及用户输入的氛围型过渡。
| Token | 值 |
|---|---|
md.sys.motion.duration.extra-long1 | 700ms |
md.sys.motion.duration.extra-long2 | 800ms |
md.sys.motion.duration.extra-long3 | 900ms |
md.sys.motion.duration.extra-long4 | 1000ms |