# Detail Hard-Cut to Whole (局部特写硬切全貌)

A huge close-up of a character stroke drifts in slowly, hard-cuts mid-push to the full sentence, then a 2px frame rests on the matching word to tie the detail to the whole; for openers that start from one detail.

- Ref: `video/motion-transition-detail-to-whole` (code video · motion · any · any · 4.5s at 30fps)
- Page: https://uifino.com/en/videos/motion-transition-detail-to-whole
- Markdown: https://uifino.com/md/videos/motion-transition-detail-to-whole.md
- Preview image: https://uifino.com/videos/motion-transition-detail-to-whole/poster.jpg

## Install

- ZIP: https://uifino.com/videos/motion-transition-detail-to-whole/source.zip

A huge close-up of a character stroke drifts in slowly, hard-cuts mid-push to the full sentence, then a 2px frame rests on the matching word to tie the detail to the whole; for openers that start from one detail.

Rendered video: https://uifino.com/videos/motion-transition-detail-to-whole/preview.mp4

## Beats

- 0-1.6s Show the detail and hold the mystery: Full-bleed close-up of strokes of the character 片, scale 1.00 toward 1.04 (2.4 s tween, power1.inOut, played for 1.6 s) Camera: push-in.
- 1.6-4.5s Reveal the whole, then point out where the detail sits: The line holds still; from 2.2 s a 2px accent frame appears on 片, rests 0.6 s, fades out in 0.3 s Camera: static. Transition: hard-cut. On-screen text: "Every film starts with one detail".

## Parameters

- `line` Sentence: default 每一支片子，都从一个细节开始
- `focusText` Text to frame: default 片
- `glyph` Close-up character: default 片
- `glyphSize` Close-up glyph size: default 3600px, range 1200 to 6000px
- `glyphX` Close-up offset X: default 500px, range -2400 to 2400px
- `glyphY` Close-up offset Y: default -210px, range -2400 to 1200px
- `pushTo` Push end scale: default 1.04, range 1 to 1.2
- `pushDuration` Push tween duration: default 2.4s, range 1 to 4s
- `boxDelay` Frame delay after the cut: default 0.6s, range 0.2 to 1.5s
- `boxHold` Frame hold: default 0.6s, range 0.2 to 1.5s
- `boxFade` Frame fade-out: default 0.3s, range 0.1 to 1s
- `ground` Ground: default #0F1712
- `ink` Ink: default #ECF2EE
- `accentColor` Frame color: default #7FD99A

## Good for

- A tease first, then the reveal of the whole and where the detail sits
- An opening line or a chapter head
- Close-ups that are vector text or shapes, no screenshot needed
- Defaults to 4.5 s: close-up 1.6 s, whole line still for 2.9 s

## Not for

- Dissolves or zoom-out reveals
- Close-ups that need blur or depth of field
- A film whose only content is this cut

## Source files (plain text)

- https://uifino.com/videos/motion-transition-detail-to-whole/source/SPEC.md
- https://uifino.com/videos/motion-transition-detail-to-whole/source/PROMPT.md
- https://uifino.com/videos/motion-transition-detail-to-whole/source/NOTICE.md
- https://uifino.com/videos/motion-transition-detail-to-whole/source/project/assets/fonts/OFL.txt
- https://uifino.com/videos/motion-transition-detail-to-whole/source/project/compositions/closeup.html
- https://uifino.com/videos/motion-transition-detail-to-whole/source/project/compositions/whole.html
- https://uifino.com/videos/motion-transition-detail-to-whole/source/project/hyperframes.json
- https://uifino.com/videos/motion-transition-detail-to-whole/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.6 KB |
| SPEC.md | doc | 7.3 KB |

### PROMPT.md

```md
# PROMPT：motion-transition-detail-to-whole

## 照抄复刻
用 `/hyperframes` 做一个 1920×1080、30 fps、4.5 秒的「局部特写硬切全貌」。两个场景文件（特写、全貌），不用图片，不开运动模糊，全片底色 `#0F1712`、字色 `#ECF2EE`、强调色 `#7FD99A`。字体用本地 `@font-face`：中文 Noto Serif SC，英文 Instrument Sans。整句 font-family 写 `"Instrument Sans", "Noto Serif SC"`，并给 Instrument Sans 的 @font-face 加 `unicode-range: U+0020-007E, U+00A0-024F`，这样全角逗号「，」和汉字都落到宋体。

特写场景（0 - 1.6 秒）：
1. 一个 3600×3600 的方块，里面一个「片」字，字号 3600px、字重 900、行高 3600px、居中，字色 `#ECF2EE`。方块左上角放在 (-340, -1470)，即居中后再偏移 X=500、Y=-210。画面里应只看到一根贯穿上下的粗竖、右边一根细横、右下角一点点另一笔，认不出是哪个字，四边都被笔画或底色铺满。
2. 外面套一个全屏容器，变换原点 (960, 540)。tween 它的 scale：1.00 → 1.04，时长 2.4 秒，缓动 `power1.inOut`，从 0 秒开始。场景只播 1.6 秒就被切走，所以只推到约 1.031，镜头在移动中被切。
3. 特写阶段不加模糊、不加景深、不加任何别的东西。

硬切（1.6 秒）：特写宿主 `data-duration="1.6"`，全貌宿主 `data-start="1.6"`、`data-duration="2.9"`。没有叠化，没有缩放。

全貌场景（1.6 - 4.5 秒）：
1. 整屏 flex 容器，左右内边距 192px，垂直居中、左对齐。文字「每一支片子，都从一个细节开始」，逗号处分两行（「每一支片子，」/「都从一个细节开始」），120px、字重 700、字距 -0.02em、行高 156px、色 `#ECF2EE`。第一帧就完整在，不做任何入场，全程不动。
2. 给「片」字包一个行内方块（`display: inline-block`、`position: relative`、行高 120px，所以高 120px），不加任何外边距、不改字距；里面放一个绝对定位的线框，画在「片」字自己的字框上：left: 0，right: -0.02em（抵消字距，宽 120px），top/bottom 各 -6px（框高 132px），`border: 2px solid #7FD99A`，无圆角、无阴影，初始 opacity 0。
3. 线框动画（场景本地时间）：0.6 秒 opacity 0→1，0.12 秒 `power2.out`；保持 0.6 秒；再 opacity 1→0，0.3 秒 `power2.in`。之后到 4.5 秒完全静止（约 1.3 秒）。

需要替换的地方：
- 整句 `line`（中文默认「每一支片子，都从一个细节开始」，英文 `Every film starts with one detail`）。
- 要框住的字 `focusText`（中文「片」，英文 `film`，必须出现在整句里）。
- 特写的字 `glyph`（默认「片」）；换字后要调 `glyphX`、`glyphY`（默认 500、-210）重新取景，字的大小 `glyphSize` 默认 3600。
- 颜色 `ground`、`ink`、`accentColor`。
- 时间：`pushTo`（1.04）、`pushDuration`（2.4）、`boxDelay`（0.6）、`boxHold`（0.6）、`boxFade`（0.3）。
- 变量声明在各场景根元素的 `data-composition-variables` 上，换值时在对应宿主上写 `data-variable-values`。
- 不是变量的：硬切时间 1.6 秒（两个宿主的 `data-start`、`data-duration`）、总长 4.5 秒（`index.html` 的 `data-duration`）、全貌字号 120px 和内边距 192px。

## 只学手法
先给一个大特写并缓推（1.00→1.04，只播 1.6 秒，切点落在镜头还在动的时候），1.6 秒处硬切到完整的一句话并保持静止；切后 0.6 秒，用 2px 强调色线框在对应的字上停 0.6 秒再 0.3 秒淡出，把局部和整体对上位置，全程没有叠化、模糊和缩放。
```

### SPEC.md

```md
# SPEC：motion-transition-detail-to-whole

## 一句话
先给「片」字笔画的大特写，缓慢推近；推到一半硬切成完整的一句话；全貌静止，一条 2px 强调色细线框在「片」字上停一下再淡掉，让观众对上刚才那个角落在哪。手法来自小米「部件近景硬切整车」：先给局部，悬念够了再给整体。

## LOOK
- 色值（中性色 2 个，强调色 1 个，取自 forest 配色）：
  - 底 `#0F1712`
  - 字 `#ECF2EE`
  - 强调色 `#7FD99A`：只用在那条 2px 线框上，面积小于画面 0.1%
  - 配色里的次要字 `#8FA096`、线 `#1F2B24`：本条用不到，没有使用
- 字体（本地 @font-face，`assets/fonts/`）：中文 Noto Serif SC（`noto-serif-sc.woff2`），西文 Instrument Sans（`instrument-sans.woff2`）。整句 font-family 顺序 `"Instrument Sans", "Noto Serif SC"`，但 Instrument Sans 的 @font-face 用 `unicode-range: U+0020-007E, U+00A0-024F` 限定只管西文字符；汉字和全角标点（含「，」U+FF0C）落到 Noto Serif SC，所以逗号是全角宋体样式，不会被西文字体抢走。
- 字号：全貌整句 120px，字重 700，字距 -0.02em，行高 156px；特写的「片」字 3600px，字重 900。共 2 档字号，字重 2 档。
- 圆角：无（全部 0）。阴影：无。渐变、辉光、描边、模糊：都没有。

### 画面几何（1920×1080）
- 特写：`#cu-glyph` 是一个 3600×3600 的方块，里面放一个「片」字，字体 3600px。方块左上角在 `((1920-3600)/2 + glyphX, (1080-3600)/2 + glyphY)`，默认 glyphX=500、glyphY=-210，即左上角 (-340, -1470)。取景结果：一根贯穿上下的粗竖（约 x 310-840，略带弧）、右边一根细横（约 y 600-700）、右下角露出另一笔的一角。认不出是哪个字，四边都被笔画或底色铺满。
- 全貌：整屏 flex 容器，左右内边距 192px，文字垂直居中、左对齐。中文以逗号分行：第一行「每一支片子，」，第二行「都从一个细节开始」。「片」字所在的行内方块（`.wh-focus`）高 120px，不加任何外边距，句子字距处处一致（全句都是 -0.02em）。
- 线框：2px 实线，`#7FD99A`，直角，画在「片」字自己的字框上：左边贴字框左缘（left: 0），右边 right: -0.02em（抵消字距，正好是 120px 见方的字框），上下各外扩 6px（top/bottom: -6px，框高 132px）。它是「片」字外框（`display:inline-block`、`position:relative`、行高 120px）的绝对定位子元素，随文字一起排，不改任何字距或外边距，不需要测量。

## MOTION
- 特写阶段 0 - 1.6 秒：只有一个动作，缓推。`#cu-zoom` 的 scale 从 1.00 走向 1.04，tween 时长 2.4 秒、缓动 `power1.inOut`，变换原点在画面中心 (960, 540)。因为 1.6 秒就切走，实际只推到 1.6/2.4 = 0.667 的进度，这时缓动值约 0.78，scale ≈ 1.031，镜头还在走（速度还没降下来），切点落在推进途中。
- 1.6 秒硬切：特写场景的宿主 `data-duration` 到 1.6 秒结束，全貌场景的宿主 `data-start` 是 1.6 秒，同一帧换画面。没有叠化、没有缩放、没有模糊。
- 全貌阶段 1.6 - 4.5 秒（共 2.9 秒）：文字第一帧就在，全程完全静止。只有细线框动：
  - 全貌场景本地 0.6 秒（全片 2.2 秒）：线框 opacity 0→1，0.12 秒，`power2.out`。
  - 保持 0.6 秒（全片 2.32 - 2.92 秒）。
  - 淡出：opacity 1→0，0.3 秒，`power2.in`（全片 2.92 - 3.22 秒）。
  - 之后静止到 4.5 秒，约 1.3 秒。
- 没有运动模糊：没有快速移动，缓推每帧位移不到 1px 级别。

## 逐拍节拍表
| 拍 | 起止秒 | 画面 | 镜头 | 转场 | 屏幕文案原文 |
| --- | --- | --- | --- | --- | --- |
| detail | 0.0 - 1.6 | 「片」字笔画特写，铺满画面 | 缓推 1.00→1.04（tween 2.4 秒，只播 1.6 秒，约推到 1.031） | 无 | 无 |
| whole | 1.6 - 4.5 | 整句静止，2.2 秒起「片」字上出现细线框，保持后 3.22 秒前淡掉 | 固定 | 1.6 秒硬切 | 每一支片子，都从一个细节开始 |

英文版：「Every film starts with one detail」，线框框住 `film`。改法见下面的参数接线。已用英文跑过一次门禁并看过截图（线框紧贴 `film`，句子自动折成两行），再改回中文。

## 参数接线
所有参数都是场景根元素 `data-composition-variables` 里的变量，换值在 `index.html` 对应宿主上写 `data-variable-values`（`#closeup` 或 `#whole`）。
特写场景 `closeup`（`project/compositions/closeup.html`）：
- `glyph`：特写的字，默认「片」
- `glyphSize`：字的大小，默认 3600px
- `glyphX`、`glyphY`：取景偏移，默认 500、-210px
- `pushTo`：缓推终点倍率，默认 1.04
- `pushDuration`：缓推 tween 时长，默认 2.4 秒（切点在 1.6 秒，所以实际只推到约 1.031）
- `ground`、`ink`：底色、字色
全貌场景 `whole`（`project/compositions/whole.html`）：
- `line`：整句，逗号处另起一行，没有逗号时按宽度平衡折行
- `focusText`：要框住的那段字，必须出现在整句里，默认「片」；英文版用 `film`
- `ground`、`ink`、`accentColor`：底色、字色、线框色
- `boxDelay`：线框在硬切后多久出现，默认 0.6 秒
- `boxHold`：线框出现后停多久，默认 0.6 秒
- `boxFade`：线框淡出时长，默认 0.3 秒
不是变量的，要改文件：
- 硬切时间 1.6 秒：`index.html` 里 `#closeup` 的 `data-duration`（1.6）和 `#whole` 的 `data-start`（1.6）、`data-duration`（2.9）；总长 4.5 秒要和 `index.html` 根、`entry.json` 的 `canvas.duration` 一起改。
- 全貌字号 120px、内边距 192px、线框线宽 2px、上下外扩 6px、左右贴字框（0 / -0.02em）：写在 `whole.html` 的样式里。
- 特写的字重 900：`closeup.html` 的 `#cu-glyph`。
- 换了特写的字，要重新调 glyphX、glyphY 取景，不同的字笔画位置不同。

## 禁用项
特写阶段加模糊或假景深；全貌用缩放从特写拉出来；叠化过渡；文字带渐变、描边、发光；画面上写手法说明；线框带圆角或辉光；全貌阶段文字再有任何动作。

## 已知取舍
- 线宽按任务书是 2px（原 1px 压缩后偏淡）；颜色 `#7FD99A` 全不透明。线框左右贴字框，不为它留空档，所以框的左右边会挨到邻字笔画的尖端，只在 0.6 秒内出现，换来整句字距全程均匀。它只是辅助指向，不当主视觉。
- 缓推每帧位移约 0.7px，整段只推 3%，肉眼接近静态；倍率 1.00→1.04 是任务书定死的，保留，用来让切点发生在镜头还在走的时候。
- 特写阶段的缓推是任务书要求，手册把「缓慢爬升的缩放」列为生成感特征。这里的缓推有用：推进中硬切才有悬念，所以保留；幅度只有 4%，且 1.6 秒就切走。
- 特写第 0 帧就是满的笔画，`first_frame_empty` 不适用。`poster` 取 2.4 秒，画面是完整的整句加线框。
- 特写四边由笔画和底色铺满，不是一整块实心；这是任务书的「只露一两笔」，底色就是留白。
- 整句是单一字号一个层级，线框只在「片」字停 0.6 秒，是任务书定死的节拍，没有额外装饰。
- 特写的字有 3600px，大于画布，所以加了 `data-layout-allow-overflow`。
```
