# Three Eases Side by Side (三种减速并排对照)

Three dots leave on the same frame and cover the same track in the same 1.2 s, only the deceleration curve differs; each has a spec card with a curve sampled from the real easing function, and the dot on the curve tracks the dot on the track frame by frame; for explaining eases or showing motion specs.

- Ref: `video/motion-data-ease-compare` (code video · motion · feature, tutorial, brand, any · any · 6s at 30fps)
- Page: https://uifino.com/en/videos/motion-data-ease-compare
- Markdown: https://uifino.com/md/videos/motion-data-ease-compare.md
- Preview image: https://uifino.com/videos/motion-data-ease-compare/poster.jpg

## Install

- ZIP: https://uifino.com/videos/motion-data-ease-compare/source.zip

Three dots leave on the same frame and cover the same track in the same 1.2 s, only the deceleration curve differs; each has a spec card with a curve sampled from the real easing function, and the dot on the curve tracks the dot on the track frame by frame; for explaining eases or showing motion specs.

Rendered video: https://uifino.com/videos/motion-data-ease-compare/preview.mp4

## Beats

- 0-1.2s Title lands, tracks and spec cards appear: Title blurs 10 px to 0 (0.25 s); three track lines draw from the left (0.7 s expo.out, 0.1 s apart); spec cards reveal top-down 0.15 s later Camera: static. On-screen text: "Same 1.2 s, three ways to slow down".
- 1.2-2.4s First run: three dots leave and arrive together: Track dots move 0 to 480 px on power1.out, power3.out, expo.out; curve dots go linear across and on the same ease up; the traveled curve is drawn in step Camera: static. On-screen text: "power1.out / power3.out / expo.out".
- 2.4-3s Pause 0.6 s, dots reset: Dots rest at the end 0.3 s; fade out 2.7 to 2.82 s, return and fade in 2.82 to 2.94 s Camera: static.
- 3-4.2s Second run: frame-identical to the first: The same tweens run again, 1.2 s Camera: static.
- 4.2-6s Rest at the end so it can be read: Fully still, dots at the end Camera: static.

## Parameters

- `title` Title: default 同样 1.2 秒，三种减速
- `durationUnit` Duration unit: default 秒
- `easeA` Ease A: default power1.out
- `easeB` Ease B: default power3.out
- `easeC` Ease C: default expo.out
- `runDuration` Run duration: default 1.2s, range 0.8 to 1.5s
- `firstRun` First run start: default 1.2s, range 1 to 1.2s
- `pause` Pause between runs: default 0.6s, range 0.5 to 1s
- `accentColor` Accent color: default #2F5BFF
- `bg` Background: default #E8E6E1
- `ink` Text color: default #1C1C1A
- `muted` Secondary text color: default #6E6C66
- `rule` Line color: default #D3D0C8
- `card` Card fill: default #F2F0EB

## Good for

- Pairing several effects with their parameters so differences read at a glance
- Explaining eases or durations that can be described in numbers
- Works in Chinese and English, three columns

## Not for

- A screen about one effect only
- Comparisons of springs or overshooting curves
- More than four columns

## Source files (plain text)

- https://uifino.com/videos/motion-data-ease-compare/source/SPEC.md
- https://uifino.com/videos/motion-data-ease-compare/source/PROMPT.md
- https://uifino.com/videos/motion-data-ease-compare/source/NOTICE.md
- https://uifino.com/videos/motion-data-ease-compare/source/project/assets/fonts/OFL.txt
- https://uifino.com/videos/motion-data-ease-compare/source/project/compositions/ease.html
- https://uifino.com/videos/motion-data-ease-compare/source/project/hyperframes.json
- https://uifino.com/videos/motion-data-ease-compare/source/project/index.html

## How to use

- Copy the beats and parameters; replace only the copy, the accent color and the product screenshots.
- `PROMPT.md` has two prompts: one to reproduce this video exactly, one to learn only the technique.
- Build with HyperFrames (`/hyperframes`); the project in the ZIP is a ready starting point.

## Files

| Path | Role | Size |
| :--- | :--- | ---: |
| PROMPT.md | doc | 3.7 KB |
| SPEC.md | doc | 7.1 KB |

### PROMPT.md

```md
# PROMPT：motion-data-ease-compare

## 照抄复刻
用 `/hyperframes` 做一个 1920×1080、30 fps、6 秒的「三种减速并排对照」动效。底色 `#E8E6E1`，主字 `#1C1C1A`，次要字 `#6E6C66`，线 `#D3D0C8`，卡片底 `#F2F0EB`，强调色 `#2F5BFF`（只给点用）。字体用本地 `@font-face`：西文 IBM Plex Sans，中文思源黑体，不要联网取字体。根上加 `data-motion-blur="on"`。

做法：
1. 标题「同样 1.2 秒，三种减速」，120px、字重 600、字距 -0.02em，左 120px、上 150px，一句话，之后不再动。
2. 三列，每列宽 528px，列间距 48px，左边缘 x = 120 / 696 / 1272。每列上面是轨道：一条 480px 长、4px 高的线（`#D3D0C8`），纵向中心 y = 530px，左端 x = 列左 + 24px，两端各一个 2×32px 的刻度（起点 `#D3D0C8`、终点 `#1C1C1A`），一个直径 32px 的圆点，圆心从起点刻度走到终点刻度，共 480px。
3. 每列下面是参数卡：宽 528px、高 240px、上边 y = 610px，2px `#D3D0C8` 边、16px 圆角、底 `#F2F0EB`，无阴影。左上写缓动名（36px、字重 600、行高 44px、左内边距 24px、距边框内侧上 22px），右上写时长「1.2 秒」（28px、字重 400、行高 36px、次要字色、右内边距 24px、上 26px）。标题行高 140px。曲线图 160×100 放在卡内：距边框内侧左 184px、上 94px（比卡片几何中心偏右、偏下 2px）：用 `gsap.parseEase(缓动名)` 在 0 到 1 上采 64 段（65 个点）连成折线，横轴时间、纵轴进度、原点在左下；叠三层：对角匀速线（2px，`#D3D0C8`）、完整曲线（2px，`#6E6C66`）、走过的曲线（4px，`#1C1C1A`，圆头）；再加一个直径 16px 的强调色点。
4. 三列缓动依次是 `power1.out`、`power3.out`、`expo.out`，不要弹簧和回弹。
5. 全部用一条 GSAP 时间线，不用回调同步。每一遍里每列四个补间同一帧开始、同样 1.2 秒：轨道点 `x` 0 到 480（该列缓动）；曲线点 `x` 0 到 160（匀速）；曲线点 `y` 100 到 0（该列缓动）；走过的曲线用 `clip-path: inset(-6px 160px -6px -6px)` 到 `inset(-6px 0px -6px -6px)`（匀速）。这样两个点每帧对应。
6. 节拍：刻度和轨道点比轨道线晚 0.25 秒开始淡入（0.2 秒）；0.1 秒标题模糊 10px 到 0（0.25 秒 `power4.out`）；0.2 / 0.3 / 0.4 秒三条轨道线从左画出（`scaleX`，0.7 秒 `expo.out`）；比轨道晚 0.15 秒三张卡从上往下揭开（`clip-path`，0.7 秒 `expo.out`）；1.2 到 2.4 秒第一遍；停在终点 0.3 秒，2.7 到 2.82 秒点和走过的曲线淡出，2.82 秒回起点再淡入（各 0.12 秒）；3.0 到 4.2 秒第二遍；4.2 到 6.0 秒完全静止，点停在终点。
7. 不要加任何标签、编号、阴影、玻璃、渐变。

需要替换的地方（都是场景根上的变量，在挂载处用 `data-variable-values` 传）：
- 文案：`title`、`durationUnit`（秒，英文 `s`）；缓动：`easeA`、`easeB`、`easeC`（换成别的减速缓动，曲线和点自动跟着变）。
- 时间：`runDuration` 1.2、`firstRun` 1.2、`pause` 0.6。
- 颜色：`accentColor`、`bg`、`ink`、`muted`、`rule`、`card`。
- 标题里的「1.2」是普通文字，改 `runDuration` 时要一起改。标题超过 14 个字符时字号自动改成 64px（英文）。

## 只学手法
把效果和参数配成对：三个点用同一条时间线、同样 1.2 秒跑同一段 480px，只换缓动（`power1.out` / `power3.out` / `expo.out`）；每个点下面的参数卡里放用真实缓动函数采样 64 段画出的 160×100 曲线，曲线上的点横向匀速、纵向走同一个缓动，和轨道上的点每帧对应；跑两遍，中间停 0.6 秒，最后停在终点 1.8 秒。
```

### SPEC.md

```md
# SPEC：motion-data-ease-compare

## LOOK
- 色值（中性色 5 个，强调色 1 个）：底 `#E8E6E1`；主字、曲线走过的部分、终点刻度 `#1C1C1A`；次要字、完整曲线 `#6E6C66`；线 `#D3D0C8`（轨道、起点刻度、卡片边、对角参考线）；卡片底 `#F2F0EB`；强调色 `#2F5BFF`（只染三个轨道点和三个曲线点，面积远小于 10%，三条轨道同一个颜色，没有渐变）。
- 字体：数字和西文 IBM Plex Sans（`assets/fonts/ibm-plex-sans.woff2`），中文 Noto Sans SC（`assets/fonts/noto-sans-sc.woff2`），都是门禁按用到的字生成的本地子集，OFL。
- 字号三档：标题 120px（字重 600，字距 -0.02em，行高 140px；标题超过 14 个字符时改用 64px，英文版走这条）；缓动名 36px（字重 600，行高 44px）；时长 28px（字重 400，行高 36px）。
- 圆角只有一档：卡片 16px；点是圆形。阴影：无。没有玻璃、渐变、辉光。
- 版面（1920×1080）：三列，列宽 528px，列间距 48px，左边距 120px，三列左边缘 x = 120 / 696 / 1272，右边缘 1800px。
  - 标题：左 120px，上 150px，宽 1680px。
  - 轨道：线长 480px、高 4px，左端 x = 列左 + 24px，纵向中心 y = 530px；起点刻度（`#D3D0C8`）和终点刻度（`#1C1C1A`）都是 2×32px。
  - 轨道点：直径 32px，起点圆心压在起点刻度上，终点圆心压在终点刻度上，圆心走过 480px。
  - 参数卡：宽 528px、高 240px，上边 y = 610px，边 2px `#D3D0C8`，圆角 16px。缓动名在左（左内边距 24px，卡内 y = 22px），时长在右（右内边距 24px，卡内 y = 26px）。
  - 曲线图：160×100px，水平居中；位置从卡片边框内侧起算：左 184px、上 94px（边框 2px，所以比卡片几何中心偏右、偏下 2px）。里面三样：对角参考线（匀速，2px，`#D3D0C8`）、完整曲线（2px，`#6E6C66`）、已走过的曲线（4px，`#1C1C1A`，圆头）。曲线点直径 16px。
- 曲线用 `gsap.parseEase(缓动名)` 拿到真实缓动函数，在 0 到 1 上均匀采 64 段共 65 个点连成折线（≥ 60 点），横轴是时间，纵轴是进度，原点在左下。
- 屏幕文案只有三类：标题、三个缓动名、三个时长，没有任何标签和注释。

## MOTION
- 同一条时间线驱动，没有任何回调。每一遍里每列四个补间同一帧开始、同一时长 1.2 秒：
  - 轨道点：`x` 0 到 480px，缓动 = 该列的缓动；
  - 曲线点横向：`x` 0 到 160px，匀速；
  - 曲线点纵向：`y` 100px 到 0，缓动 = 该列的缓动；
  - 已走过的曲线：遮罩 `clip-path: inset(-6px 160px -6px -6px)` 到 `inset(-6px 0px -6px -6px)`，匀速，右边缘始终等于曲线点的横坐标。
  - 所以任何一帧里，轨道点的位置 = 480 × 缓动(进度)，曲线点 = (160 × 进度，100 × (1 − 缓动(进度)))，两边逐帧对应。
- 三列缓动：`power1.out`、`power3.out`、`expo.out`（都是减速，没有弹簧和回弹）。
- 入场（0.1 到 1.2 秒）：标题模糊 10px 到 0 加透明度，0.25 秒 `power4.out`，0.1 秒起；轨道线从左画出（`scaleX` 0 到 1，0.7 秒 `expo.out`），三列起点 0.2 / 0.3 / 0.4 秒；刻度和轨道点透明度 0.2 秒，比轨道线晚 0.25 秒开始（线画出约一半时才出现，避免端点先于线）；参数卡从上往下揭开（`clip-path` 0.7 秒 `expo.out`），比轨道晚 0.15 秒。
- 第一遍 1.2 到 2.4 秒；停在终点，0.3 秒不动；2.7 到 2.82 秒轨道点、曲线点、走过的曲线一起淡出（0.12 秒 `power3.in`），2.82 秒回到起点并在 2.82 到 2.94 秒淡入；3.0 秒第二遍开始，到 4.2 秒。「中间停 0.6 秒」指 2.4 到 3.0 秒没有任何点在跑。
- 4.2 到 6.0 秒完全静止，共 1.8 秒（≥ 1.2 秒），点停在终点。
- 运动模糊：`index.html` 根上 `data-motion-blur="on"`，成片里最快的几帧（第二遍起跑、expo.out 约每帧 90px）有明显横向拖影，已在 `draft.mp4` 上看过。

## 逐拍节拍表
| 拍 | 起止秒 | 画面 | 镜头 | 转场 | 屏幕文案原文 |
| --- | --- | --- | --- | --- | --- |
| in | 0.0 - 1.2 | 标题模糊落定；三条轨道从左画出；三张参数卡从上往下揭开 | 固定 | 无 | 同样 1.2 秒，三种减速 / power1.out / power3.out / expo.out / 1.2 秒 |
| run1 | 1.2 - 2.4 | 三个点同一帧出发，1.2 秒同时到达，曲线上的点同步走 | 固定 | 无 | 同上 |
| rest | 2.4 - 3.0 | 点停在终点；2.7 - 2.94 秒淡出回起点再淡入 | 固定 | 无 | 同上 |
| run2 | 3.0 - 4.2 | 第二遍，和第一遍逐帧相同 | 固定 | 无 | 同上 |
| hold | 4.2 - 6.0 | 完全静止 | 固定 | 无 | 同上 |

英文版：「Same 1.2 s, three ways to slow down」，时长单位变量填 `s`。已临时用英文跑过门禁的截图确认标题自动用 64px、不换行不溢出。

## 参数接线
全部参数都是 `project/compositions/ease.html` 根元素 `data-composition-variables` 里的变量，用户的 AI 在 `index.html` 挂载处用 `data-variable-values` 覆盖。默认值与脚本里的 `D` 表一致：
- 内容：`title`（同样 1.2 秒，三种减速）、`durationUnit`（秒，英文 `s`）、`easeA` power1.out、`easeB` power3.out、`easeC` expo.out。缓动名既显示在卡上，也决定曲线和点的运动，换成别的 GSAP 减速缓动（如 `power2.out`、`circ.out`）整条自动跟着变。
- 时间：`runDuration` 1.2（0.8 到 1.5）、`firstRun` 1.2（1 到 1.2）、`pause` 0.6（0.5 到 1）。第二遍起点 = `firstRun` + `runDuration` + `pause`，淡出起点 = 第一遍结束 + `pause` − 0.3 秒。范围内最后一遍仍有 ≥ 1.2 秒的静止。
- 外观：`accentColor` `#2F5BFF`、`bg` `#E8E6E1`、`ink` `#1C1C1A`、`muted` `#6E6C66`、`rule` `#D3D0C8`、`card` `#F2F0EB`。
- `title` 是普通字符串：标题里的「1.2」不会跟着 `runDuration` 变，改时长时要手动改标题。
- 不是变量的常量（在 `ease.html` 脚本顶部 `TRACK`、`GW`、`GH`、`STEPS`、`CLIP_Y` 和样式里改）：轨道长 `TRACK` 480、曲线图 `GW`×`GH` 160×100、采样段数 `STEPS` 64、遮罩外扩 `CLIP_Y` −6px、版面数字、淡出 0.12 秒、入场时间。`index.html` 和场景的 `data-duration` 6 也不是变量。
- 换成英文或新字符后重跑一次门禁，字体子集才会补上新字。

## 禁用项
弹簧、回弹、elastic、back 类曲线；每条轨道不同颜色或渐变；卡片阴影、玻璃；点击光圈；标签、编号、画面上的说明；用回调同步点的位置；呼吸、漂浮；曲线图以外的装饰。

## 已知取舍
- 门禁警告 `cream-palette`：底色 `#E8E6E1` 是任务书定死的 stone 暖灰，按手册第 10 节第 16 条写在这里即可。
- 淡出的 0.12 秒里，终点刻度会从半透明的点后面透出来。只有 4 帧，不再为它加遮挡。
- 3 个轨道点同色同大小，要看清「谁先到」靠它们的位置，不靠颜色，这是任务书的要求。
- 曲线图只有 160×100，这是任务书定的尺寸，所以放在 528px 的卡里左右有空白，曲线居中。
- 入场动效第一帧为空，`poster` 取 3.3 秒：第二遍跑到 0.3 秒，三个点分得最开。
```
