# Match Cut on a Shape (形状匹配剪辑)

A dot accelerates across scene A and hard-cuts at its fastest frame into a differently colored scene B, where the same dot at the same spot and size decelerates to rest, so it reads as one object crossing two worlds.

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

## Install

- ZIP: https://uifino.com/videos/motion-transition-match-cut-shape/source.zip

A dot accelerates across scene A and hard-cuts at its fastest frame into a differently colored scene B, where the same dot at the same spot and size decelerates to rest, so it reads as one object crossing two worlds.

Rendered video: https://uifino.com/videos/motion-transition-match-cut-shape/preview.mp4

## Beats

- 0-0.4s Let the viewer see the dot first: Light ground, blue dot still on a thin line at the left, no text Camera: static.
- 0.4-0.9s The dot accelerates to peak speed: The dot moves right 395.33 px, power4.in, with motion blur, fastest at 0.9 s (about 3163 px/s) Camera: static.
- 0.9-1s Hard cut at peak speed: Frame 27 is the dark scene; dot position, diameter and speed continue from the previous frame, no flash or dissolve Camera: static. Transition: hard cut at peak velocity.
- 1-1.7s The same dot decelerates to rest: Dark ground, the dot decelerates 364.67 px to the right on expo.out and rests at center over 0.8 s Camera: static.
- 1.3-1.97s One line at the landing: Two word groups rise from their masks, expo.out, 0.6 s each, 0.07 s apart Camera: static. On-screen text: "Same dot, new world".
- 1.97-4s Let the line rest: Fully still Camera: static.

## Parameters

- `dotSize` Dot diameter: default 160px, range 80 to 280px
- `dotY` Dot center y: default 440px, range 300 to 640px
- `startX` Dot start x: default 200px, range 120 to 600px
- `restX` Dot resting x: default 960px, range 760 to 1400px
- `moveStart` Move start (the cut stays at 0.9 s; the accelerating move runs until then): default 0.4s, range 0.2 to 0.6s
- `settleDuration` Settling move length: default 0.8s, range 0.5 to 1.2s
- `groundA` Scene A background: default #E8E6E1
- `dotColorA` Scene A dot color: default #2F5BFF
- `lineColor` Scene A line color: default #6E6C66
- `groundB` Scene B background: default #1C1C1A
- `dotColorB` Scene B dot color: default #E8E6E1
- `ink` Scene B text color: default #E8E6E1
- `headline` Scene B line, groups separated by |: default 一样的点，|不同的世界
- `textStart` Text start after the cut: default 0.4s, range 0.2 to 0.8s
- `riseDuration` Rise duration per group: default 0.6s, range 0.4 to 0.9s
- `stagger` Group stagger: default 0.07s, range 0.06 to 0.09s

## Good for

- A transition between two sections with very different color or theme
- Cutting from one chapter to the next in a launch film
- When you want a clean hard cut without a flash or dissolve

## Not for

- Slow, lyrical storytelling
- Scenes with no shape that can be aligned across the cut
- State changes inside a single scene

## Source files (plain text)

- https://uifino.com/videos/motion-transition-match-cut-shape/source/SPEC.md
- https://uifino.com/videos/motion-transition-match-cut-shape/source/PROMPT.md
- https://uifino.com/videos/motion-transition-match-cut-shape/source/NOTICE.md
- https://uifino.com/videos/motion-transition-match-cut-shape/source/project/assets/fonts/OFL.txt
- https://uifino.com/videos/motion-transition-match-cut-shape/source/project/compositions/scene-a.html
- https://uifino.com/videos/motion-transition-match-cut-shape/source/project/compositions/scene-b.html
- https://uifino.com/videos/motion-transition-match-cut-shape/source/project/hyperframes.json
- https://uifino.com/videos/motion-transition-match-cut-shape/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.6 KB |
| SPEC.md | doc | 6.3 KB |

### PROMPT.md

```md
# PROMPT：motion-transition-match-cut-shape

## 照抄复刻
用 `/hyperframes` 做一个 1920×1080、30 fps、4 秒的形状匹配剪辑，只有两个场景，一刀硬切，不要淡入淡出、叠化或闪白。根元素开 `data-motion-blur="on"`，`data-motion-blur-shutter="180"`。

画面 A（0 到 0.9 秒，宿主 `data-duration="0.9"`）：底 `#E8E6E1`，一条 2px 的细线 `#6E6C66`（x 从 160 到 1760，圆心高度 y = 440），一个直径 160 的蓝点 `#2F5BFF`，圆心起点 x = 200。点静止到 0.4 秒，然后 0.5 秒内向右 `power4.in` 移动 395.33px，没有字。
画面 B（0.9 到 4.0 秒，宿主 `data-start="0.9"`、`data-duration="3.1"`；根 `data-duration="4"`）：底 `#1C1C1A`，一个同样直径 160 的点 `#E8E6E1`，第 0 帧圆心就在 x = 595.33、y = 440（和切点前完全重合），然后 0.8 秒内向右 `expo.out` 减速 364.67px，落在 x = 960。
速度对接：A 末端速度 = 4 × 395.33 ÷ 0.5 = 3162.7 px/s，B 起点速度 = 10·ln2 ÷ (1 − 2^-10) × 364.67 ÷ 0.8 = 3162.7 px/s。切点距离 = (restX − startX) ÷ (1 + 4 × settleDuration ÷ (10·ln2 ÷ (1 − 2^-10) × 加速段时长，加速段时长 = 0.9 − moveStart))，让代码按这条式子算，不要手填。切点时刻 0.9 秒要落在整帧上。
字（只在 B）：「一样的点，不同的世界」，120px、字重 600、字距 -0.02em，单行居中，视觉中心 y = 700。拆成两组，各套一层 `overflow: hidden` 的遮罩，`yPercent` 从 115 升到 0，`expo.out`，每组 0.6 秒，间隔 0.07 秒，B 开始后 0.4 秒起，1.97 秒落定，之后停到片尾（2.03 秒）完全静止。
字体：中文思源黑体，西文 Schibsted Grotesk，本地 `@font-face`，不联网。

需要替换的地方（都是场景根上的变量；两个场景共用的 `dotSize`、`dotY`、`startX`、`restX`、`moveStart`、`settleDuration` 要在两个宿主上同时覆盖；加速段时长不是变量，固定等于 0.9 − `moveStart`，切点固定 0.9 秒）：
- 底色 `groundA`、`groundB`，点色 `dotColorA`、`dotColorB`，细线色 `lineColor`，字色 `ink`。
- 一句话 `headline`，组间用 `|`，英文写 `Same dot,|new world`。
- 点的大小、位置、起落点和各段时长（见上）。

## 只学手法
匹配剪辑靠三样对齐：位置、大小、速度方向。点在 A 里用 `power4.in` 加速（0.5 秒、395px），在速度最大的那一帧硬切到 B，B 里同样位置、同样 160px 的点用 `expo.out` 减速（0.8 秒、365px），两边速度都是 3163 px/s；切点前后配色可以完全不同，快速段开运动模糊。
```

### SPEC.md

```md
# SPEC：motion-transition-match-cut-shape

## LOOK
- 色值：中性色 3 个，强调色 1 个，全部来自 BRIEF 的 stone 配色。
  - 画面 A 底 `#E8E6E1`，画面 B 底 `#1C1C1A`（B 的底就是 stone 的字色，整条片画面里用到 3 个中性色：`#E8E6E1`、`#1C1C1A`、`#6E6C66`；`#D3D0C8` 这条片不用）。
  - A 的点用强调色 `#2F5BFF`，B 的点用 `#E8E6E1`，B 的字用 `#E8E6E1`。两个画面的点颜色不同，靠位置、大小、速度对上，不靠颜色。
  - A 里一条贯穿画面的细线 `#6E6C66`（BRIEF 的次要字色，压在 `#E8E6E1` 底上对比度约 4.3:1，看得清），粗 2px，和点的圆心在同一高度，起止 x = 160 到 1760。
  - 强调色只有那一个 160px 的点，面积约 0.97%（远小于 10%）。
- 字体：中文 Noto Sans SC，西文 Schibsted Grotesk，各一个族，本地 `@font-face`，文件 `assets/fonts/noto-sans-sc.woff2`、`assets/fonts/schibsted-grotesk.woff2`（门禁按用到的字生成子集，OFL）。
- 字号：只有一档，120px，字重 600（10 个字约 1200px 宽，手机竖看也能读），字距 -0.02em，行高 1.3。
- 圆角：只有圆（点，160px 宽高相等）。没有别的圆角。
- 阴影：无。
- 点：直径 160px，两个画面完全一致，圆心 y = 440。
- 版面：A 无字。B 的字单行居中，视觉中心 y = 700。

## MOTION
- 画布 1920×1080，30 fps，4.0 秒。全片只有两个场景，一刀硬切，没有淡入淡出，没有闪白，没有叠化。
- 画面 A（0.0 – 0.9 秒）：点在 x = 200 静止 0.4 秒；0.4 秒起向右加速，`power4.in`，0.5 秒（= 切点 0.9 秒 − `moveStart`），到 x = 595.33（共 395.33px）。0.9 秒是整条片速度的最大值，切点就在这一刻。
- 画面 B（0.9 – 4.0 秒）：B 的第 0 帧（0.9 秒，第 27 帧）点就在 x = 595.33，大小一样；接着 `expo.out` 向右减速 0.8 秒，落在 x = 960（共 364.67px），1.7 秒起静止。
- 速度对接：A 末端速度 = 4 × 395.33 ÷ 0.5 = 3162.7 px/s（每帧约 105px）；B 起点速度 = 10·ln2 ÷ (1 − 2^-10) × 364.67 ÷ 0.8 = 3162.7 px/s。两边相等。代码里的切点位置不是写死的，由 `startX`、`restX`、`moveStart`、`settleDuration` 按这条等式算出来：`moveDuration = 0.9 − moveStart`，`切点距离 = (restX − startX) ÷ (1 + 4 × settleDuration ÷ (10·ln2 ÷ (1 − 2^-10) × moveDuration))`。
- 切点帧：第 26 帧点在 x = 500.0，第 27 帧（B 的第 0 帧）在 x = 595.3，帧间位移 95px，接上了第 25 到 26 帧的 77px，没有停顿也没有跳回。
- 运动模糊：根上 `data-motion-blur="on"`，`data-motion-blur-shutter="180"`，只给快速段用。
- 字（只在 B）：「一样的点，不同的世界」拆成「一样的点，」「不同的世界」两组（逗号跟在第一组后面），各套一层 `overflow: hidden` 的遮罩，从遮罩下沿 `yPercent: 115` 升到 0，`expo.out`，每组 0.6 秒，组间隔 0.07 秒，B 的 0.4 秒（全片 1.3 秒）起，全部在 1.97 秒落定，之后完全静止；落定后再停 2.03 秒，最后一句从开始升起到片尾可见 2.7 秒。不加透明度、不加模糊。
- 没有退场：它是转场样例，最后一帧停在落定的画面上。

## 逐拍节拍表
| 拍 | 起止秒 | 画面 | 镜头 | 转场 | 屏幕文案原文 |
| --- | --- | --- | --- | --- | --- |
| rest | 0.0 - 0.4 | A：浅色底，蓝点静止在左侧细线上 | 固定 | 无 | 无 |
| accelerate | 0.4 - 0.9 | A：点向右加速，`power4.in`，395.33px，带运动模糊 | 固定 | 无 | 无 |
| cut | 0.9 | 硬切一帧：浅色底换深色底，点位置、大小、速度不变 | 固定 | 硬切，在速度峰值 | 无 |
| settle | 0.9 - 1.7 | B：深色底，点向右减速 `expo.out` 落到画面中央 | 固定 | 无 | 无 |
| text | 1.3 - 1.97 | B：两组字从遮罩下升起 | 固定 | 无 | 一样的点，不同的世界 |
| hold | 1.97 - 4.0 | B：全部静止 | 固定 | 无 | 同上 |

英文版：「Same dot, new world」，变量写成 `Same dot,|new world`（两组），同样的参数。第 1 轮已用 `Same dot, |new world!` 加 `restX` 1100（只给 B）临时跑过 2.5 秒的画面，字和点都跟着变；西文组只要不含中日文字符，后面就补一个不换行空格，所以带 `!`、`?` 的英文也不会贴在一起；跑完已改回默认。

## 参数接线
共享变量在两个场景文件的根元素上各声明一次，默认值相同；改共享变量时，在 `index.html` 两个宿主上用同一份 `data-variable-values` 一起覆盖。
- 两个场景都读：`dotSize`（160）、`dotY`（440）、`startX`（200）、`restX`（960）、`moveStart`（0.4，A 里点开始动的秒数，B 只用它算切点距离）、`settleDuration`（0.8）。
- 只有 A 读：`groundA`（`#E8E6E1`）、`dotColorA`（`#2F5BFF`）、`lineColor`（`#6E6C66`）。
- 只有 B 读：`groundB`（`#1C1C1A`）、`dotColorB`（`#E8E6E1`）、`ink`（`#E8E6E1`）、`headline`（`一样的点，|不同的世界`）、`textStart`（0.4，B 里的秒数）、`riseDuration`（0.6）、`stagger`（0.07）。
- 切点位置由上面的等式算出，不是变量。切点时刻固定为 0.9 秒（第 27 帧，写死在两个场景的常量 `CUT` 和宿主的 `data-duration`/`data-start`），所以没有 `moveDuration` 变量：改 `moveStart` 时加速段自动变成 0.9 − `moveStart`，切点永远落在整帧上、速度永远对接。要改切点时刻，就同时改两个场景的 `CUT` 和宿主 `data-duration`（A）、`data-start`（B）。
- 时长不是变量：总长 4 秒写在 `index.html`（根 `data-duration="4"`，B 宿主和场景根 `data-duration="3.1"`），改的话一起改。

## 禁用项
淡入淡出、叠化、切点闪白、第三个场景、画面上的标签和注释、点的呼吸或漂浮、点击光圈、弹跳、发光、渐变、假浏览器、产品截图。

## 已知取舍
- 门禁警告 `first_frame_empty`：保留。第 0 帧有点和细线，但没有文字，门禁只认文字；这条转场样例按设计在开头只有一个静止的点。
- `line_unread`：第 1 轮已通过把总长拉到 4 秒消掉，字落定后停 2.03 秒，满足「字数 × 0.25 秒」和「最后一句至少 2 秒」。
- B 里没有退场动作，最后一帧停在落定画面，这是转场样例的收尾方式。
```
