緩動與持續時間:token 與規格
緩動與持續時間可打造反應靈敏且富有表現力的動態效果。
TIP
在 Expressive 版本更新中,元件與動態效果已改用動態物理系統,此系統以彈簧物理為基礎。產品應遷移至新系統。緩動與持續時間系統仍供轉場使用;尚未升級至 GM3 Expressive 的團隊仍可繼續使用,但該系統已不再維護。
token
動態效果中的緩動與持續時間可使用緩動與持續時間 token 實作。進一步瞭解設計 token
| 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 緩動面板(可供下載) | ||
標準緩動集
此組緩動曲線適用於簡單、小型或以功能為導向的轉場。
| 標準 | 標準減速 | 標準加速 | |
|---|---|---|---|
| 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 緩動面板(可供下載) | ||
持續時間
短持續時間
這些持續時間適用於小型、以功能為導向的轉場。
| 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 |