# Strike Out the Old Number (划掉旧数字)

The old number appears, a line strikes it out left to right and dims it, then the new number lands beside it in the accent color; a one-shot before-and-after comparison.

- Ref: `video/motion-data-before-after` (code video · motion · any · any · 4s at 30fps)
- Page: https://uifino.com/en/videos/motion-data-before-after
- Markdown: https://uifino.com/md/videos/motion-data-before-after.md
- Preview image: https://uifino.com/videos/motion-data-before-after/poster.jpg

## Install

- ZIP: https://uifino.com/videos/motion-data-before-after/source.zip

The old number appears, a line strikes it out left to right and dims it, then the new number lands beside it in the accent color; a one-shot before-and-after comparison.

Rendered video: https://uifino.com/videos/motion-data-before-after/preview.mp4

## Beats

- 0-1s Show the old value first: From 0.2 s the lead-in and old value sharpen from blur, power4.out, 0.2 s, no movement Camera: static. On-screen text: "One film: 12 minutes".
- 1-1.5s Strike the old value: A 6 px line strikes the old value left to right in 0.35 s, power2.inOut; it dims to 50% and stays; then a 0.15 s pause Camera: static.
- 1.5-4s New value lands, then everything holds: "→ 40 seconds" in the accent color slides in 24 px and sharpens, 0.45 s, expo.out; still from 1.95 s for 2.05 s Camera: static. On-screen text: "One film: 12 minutes → 40 seconds".

## Parameters

- `leadText` Lead-in: default 出一支片子：
- `oldText` Old value: default 12 分钟
- `newText` New value: default 40 秒
- `arrowText` Connector character: default →
- `accentColor` Accent color: default #D4412A
- `bg` Background: default #F6F5F2
- `ink` Text and strike color: default #121212
- `inkMuted` Muted text color: default #6B6966
- `bigSize` Number row size: default 120px, range 96 to 120px
- `leadSize` Lead-in size: default 64px, range 48 to 64px
- `strikeStart` Strike start: default 1s, range 0.8 to 1.4s
- `strikeDuration` Strike duration: default 0.35s, range 0.25 to 0.5s
- `strikeThickness` Strike thickness: default 6px, range 4 to 8px
- `newDelay` New value delay: default 0.15s, range 0.1 to 0.25s
- `oldDim` Old value opacity: default 0.5, range 0.3 to 0.6

## Good for

- A before-and-after of one number
- Efficiency or cost gains in a launch film
- Works for Chinese and English copy

## Not for

- Scenes that need a rolling counter
- Several comparisons at once
- Hand-drawn looks

## Source files (plain text)

- https://uifino.com/videos/motion-data-before-after/source/SPEC.md
- https://uifino.com/videos/motion-data-before-after/source/PROMPT.md
- https://uifino.com/videos/motion-data-before-after/source/NOTICE.md
- https://uifino.com/videos/motion-data-before-after/source/project/assets/fonts/OFL.txt
- https://uifino.com/videos/motion-data-before-after/source/project/claims.json
- https://uifino.com/videos/motion-data-before-after/source/project/compositions/before-after.html
- https://uifino.com/videos/motion-data-before-after/source/project/hyperframes.json
- https://uifino.com/videos/motion-data-before-after/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 | 2.5 KB |
| SPEC.md | doc | 5.5 KB |

### PROMPT.md

```md
# PROMPT：motion-data-before-after

## 照抄复刻
用 `/hyperframes` 做一个 1920×1080、30 fps、4 秒的数据对比动效，底色 `#F6F5F2`，没有别的元素。

画面：水平居中的两行。上面一行引导语「出一支片子：」，64px、字重 500、颜色 `#6B6966`。下面一行 120px、字重 700、字距 -0.02em，从左到右依次是旧值「12 分钟」（颜色 `#121212`）、箭头「→」（`#6B6966`，字重 400，比数字细）、新值「40 秒」（强调色 `#D4412A`），三段间距 48px，行间距 40px，整块在画面垂直居中。三段位置从头到尾固定，没出现的只是透明。中文用思源黑体，数字和英文用 Schibsted Grotesk，都用本地 `@font-face`。

节拍：
1. 0.20 秒起，引导语和旧值一起从 `blur(8px)`、透明度 0 变清晰，0.20 秒，`power4.out`，没有位移。
2. 1.00 秒起，一条线盖在旧值上：高 6px、颜色 `#121212`、圆角 0、宽度等于旧值文字宽度，线的中心在旧值盒子 53% 高度处。`scaleX` 从 0 到 1，原点在左边，0.35 秒，`power2.inOut`。
3. 同一时间（1.00–1.35 秒），旧值文字不透明度从 1 线性降到 0.5，划线本身保持 `#121212`。旧值保留在画面上，不消失。
4. 划线结束后晚 0.15 秒，即 1.50 秒起，「→ 40 秒」整体从右侧 24px 滑回原位，同时 `blur(6px)` 变清晰、透明度 0 到 1，0.45 秒，`expo.out`。这一个 tween 就是新值的全部动作，不计数滚动。
5. 1.95–4.00 秒完全静止，不呼吸、不漂移、不缩放，也没有退场。

需要替换的地方：
- 文案：`leadText`（出一支片子：）、`oldText`（12 分钟）、`newText`（40 秒）、`arrowText`（→）。英文版：`One film:`、`12 minutes`、`40 seconds`，时间不变。
- 颜色：`accentColor`（#D4412A）、`bg`、`ink`、`inkMuted`。
- 字号：`bigSize`（120）、`leadSize`（64）。
- 时间和线：`strikeStart`（1.0）、`strikeDuration`（0.35）、`strikeThickness`（6）、`newDelay`（0.15）、`oldDim`（0.5）。
- 数字只是演示数据，换成你自己的真实数字，并在 `claims.json` 写明出处。

## 只学手法
旧值先出现，一条 6px 的直线用 0.35 秒从左到右划过它，旧值同时变灰到 50% 但留在画面上；划线结束后晚 0.15 秒，强调色的新值用 0.45 秒（`expo.out`）落在它右边，之后整句静止 2 秒以上。对比只做一次，不用手绘线、不用箭头图标、新值不计数滚动。
```

### SPEC.md

```md
# SPEC：motion-data-before-after

## LOOK
- 色值：底 `#F6F5F2`，字 `#121212`，次要字 `#6B6966`（引导语和箭头），强调色 `#D4412A`（只染新数字「40 秒」，面积不到画面 3%）。中性色只用 3 个：底、字、次要字（BRIEF 给的分隔线色 `#E2DFD8` 本条用不上，不放）。
- 字体：中文 Noto Sans SC（`assets/fonts/noto-sans-sc.woff2`），西文和数字 Schibsted Grotesk（`assets/fonts/schibsted-grotesk.woff2`），都由门禁按用到的字生成子集。`font-family` 先写 Schibsted Grotesk，再写 Noto Sans SC，所以数字走 Schibsted，汉字走 Noto。
- 字号：两档。数字行 120px，字重 700，字距 -0.02em；引导语 64px，字重 500。
- 版式：画面水平居中的两行。引导语「出一支片子：」在上，数字行「12 分钟 → 40 秒」在下，行间距 40px，整块在画面垂直居中。数字行三段（旧值、箭头、新值）间距 48px，三段位置在整条动效里固定不动，没出现的段只是透明，所以旧值不会因为新值出现而挪位。
- 划线：旧值正中偏下一点的水平线，高 6px，颜色 `#121212`（与旧值初始同色），圆角 0，宽度等于旧值文字的宽度，不出头。线的纵向位置在旧值盒子 53% 处（线中心），落在汉字和数字的视觉中线上。
- 圆角：只有划线的 0。阴影：无。没有任何装饰元素、图标、卡片。
- 箭头：BRIEF 的屏幕文案里自带「→」，它是文字字符，次要字色，字重 400（数字行其余是 700，所以箭头比数字细），和数字行同一档字号 120px，不是图标，不单独做动画，随新值一起出现。

## MOTION
- 旧值和引导语入场：0.20 秒起，整体从 `blur(8px)` 和透明度 0 变清晰，0.20 秒，`power4.out`，没有位移。
- 划线：1.00 秒起，`scaleX` 从 0 到 1，原点在左边，0.35 秒（1.00–1.35），`power2.inOut`，只动一条线。
- 旧值变灰：与划线同一时间段（1.00–1.35 秒），旧值文字（不含划线）不透明度从 1 到 0.5（落在底色上等效约 `#898886`），`none`（线性），划线本身保持 `#121212` 不变，划完旧值仍然看得清。旧值不消失。
- 新值出现：划线结束后晚 0.15 秒，即 1.50 秒起。「→ 40 秒」整体从右侧 24px 滑回原位、`blur(6px)` 变清晰、透明度 0 到 1，0.45 秒（1.50–1.95），`expo.out`，一个 tween，不计数滚动，不弹跳。
- 静止：1.95–4.00 秒，共 2.05 秒，没有任何 tween，不呼吸、不漂移、不缩放。
- 没有退场：片尾保持落定画面到最后一帧。
- 缓动共 3 种：`power4.out`（入场）、`power2.inOut`（划线）、`expo.out`（新值）。

## 逐拍节拍表
| 拍 | 起止秒 | 画面 | 镜头 | 转场 | 屏幕文案原文 |
| --- | --- | --- | --- | --- | --- |
| old | 0.00 - 1.00 | 0.20 秒起引导语和旧值变清晰；其余时间静止 | 固定 | 无 | 出一支片子：12 分钟 |
| strike | 1.00 - 1.50 | 1.00–1.35 一条 6px 线从左到右划过旧值，同时旧值变灰到 50%；1.35–1.50 停顿 0.15 秒 | 固定 | 无 | 同上 |
| new | 1.50 - 4.00 | 1.50 秒起「→ 40 秒」落定，1.95 秒后整句静止 2.05 秒 | 固定 | 无 | 出一支片子：12 分钟 → 40 秒 |

英文版：引导语 `One film:`，旧值 `12 minutes`，新值 `40 seconds`，时间不变。英文旧值更长，120px 下数字行约 1430px 宽（已用英文版实测），仍在 90% 安全框（1728px）内。

## 参数接线
全部是 `project/compositions/before-after.html` 根元素 `data-composition-variables` 里的变量，用户的 AI 在挂载处用 `data-variable-values` 覆盖。

| 变量 | 默认 | 范围 | 改它画面哪里变 |
| --- | --- | --- | --- |
| leadText | 出一支片子： | 文字 | 引导语 |
| oldText | 12 分钟 | 文字 | 被划掉的旧值 |
| newText | 40 秒 | 文字 | 新值 |
| arrowText | → | 文字 | 两个值之间的字符 |
| accentColor | #D4412A | 颜色 | 新值颜色 |
| bg / ink / inkMuted | #F6F5F2 / #121212 / #6B6966 | 颜色 | 底色、主字色和划线色、引导语和箭头色 |
| bigSize | 120 | 96–120 px | 数字行字号 |
| leadSize | 64 | 48–64 px | 引导语字号 |
| strikeStart | 1.0 | 0.8–1.4 秒 | 划线起点，新值跟着后移 |
| strikeDuration | 0.35 | 0.25–0.5 秒 | 划线和变灰的时长 |
| strikeThickness | 6 | 4–8 px | 划线粗细 |
| newDelay | 0.15 | 0.1–0.25 秒 | 新值比划线结束晚多久 |
| oldDim | 0.5 | 0.3–0.6 | 划完旧值保留的不透明度 |

静止时长不是变量，它等于 4 秒总长减去新值落定时刻（默认 1.95 秒）。改了 strikeStart 或 newDelay，静止段会变短；要保持 2 秒以上，strikeStart + strikeDuration + newDelay 不超过 1.5 秒。

## 禁用项
手绘乱线、箭头图标、新值计数滚动、划线上加粗发光、给每个元素都套淡入加上滑的统一入场（本条只有新值这一处带位移，引导语和旧值只做模糊变清晰）、弹跳、点击光圈、画面上的说明和标签、任何退场动画。

## 已知取舍
- 画面共 14 个字，按「字数 × 0.25 秒」要停留 3.5 秒；本条总长是 BRIEF 定的 4 秒，引导语和旧值 0.2 秒就出现，整句在 1.95 秒完整，到片尾共可读约 3.8 秒，够读。
- 第 0 帧只有底色，门禁的 `first_frame_empty` 警告保留：入场本来就从空画面开始，封面取 3.0 秒，那时整句已落定。
- 「→」是 BRIEF 屏幕文案自带的文字字符，不是图标，已在 LOOK 里说明。
```
