# Prompt Then Conditions (一句需求再补条件)

A request line rises in whole and holds 1.0 s, then three smaller conditions slide in from the left 0.5 s apart while the whole group re-centres on every addition. For showing a one-line task with a few requirements in a launch film.

- Ref: `video/motion-text-prompt-then-conditions` (code video · motion · any · any · 5.5s at 30fps)
- Page: https://uifino.com/en/videos/motion-text-prompt-then-conditions
- Markdown: https://uifino.com/md/videos/motion-text-prompt-then-conditions.md
- Preview image: https://uifino.com/videos/motion-text-prompt-then-conditions/poster.jpg

## Install

- ZIP: https://uifino.com/videos/motion-text-prompt-then-conditions/source.zip

A request line rises in whole and holds 1.0 s, then three smaller conditions slide in from the left 0.5 s apart while the whole group re-centres on every addition. For showing a one-line task with a few requirements in a launch film.

Rendered video: https://uifino.com/videos/motion-text-prompt-then-conditions/preview.mp4

## Beats

- 0-1.8s Land the whole request and let it rest: Ground only until 0.30 s; the line rises from the mask edge, lands at 0.80 s, then rests 1.0 s Camera: static. On-screen text: "Make a 30-second launch film".
- 1.8-2.3s Add the first condition: Condition one slides in 24 px from the left; the group moves up 54 px to stay centred Camera: static. On-screen text: "Vertical 9:16".
- 2.3-2.8s Add the second condition: Condition two slides in; the group moves up 36 px Camera: static. On-screen text: "Chinese and English captions".
- 2.8-3.2s Add the third condition: Condition three slides in; the group moves up 36 px and lands at 3.20 s Camera: static. On-screen text: "End on the URL".
- 3.2-5.5s Let the viewer read the finished brief: All four lines stay still for 2.3 s Camera: static.

## Parameters

- `prompt` Request line: default 给新品做一支 30 秒发布片
- `cond1` Condition 1: default 竖版 9:16
- `cond2` Condition 2: default 中英双字幕
- `cond3` Condition 3: default 结尾停在网址
- `bg` Background: default #0E0E10
- `ink` Request text color: default #F4F4F2
- `muted` Condition text color: default #8A8A8E
- `accent` Short bar color: default #F2B544
- `fontSize` Max request font size: default 120px, range 64 to 160px
- `firstAt` Request start: default 0.3s, range 0 to 1s
- `promptDuration` Request entrance duration: default 0.5s, range 0.3 to 1s
- `hold` Pause after the request lands: default 1s, range 0.5 to 2s
- `gap` Interval between conditions: default 0.5s, range 0.4 to 1s
- `slide` Condition slide distance: default 24px, range 8 to 64px
- `shiftDuration` Slide and shift duration: default 0.4s, range 0.2 to 0.8s

## Good for

- Showing a one-line task with a few extra requirements
- A request within about 12 Chinese characters or 6 English words, conditions of 3 to 8 characters each
- AI-product stories where the user adds constraints after the first line

## Not for

- Typed-in-character input scenes
- Lists longer than three lines
- Conditions that need checkboxes, numbers or status changes

## Source files (plain text)

- https://uifino.com/videos/motion-text-prompt-then-conditions/source/SPEC.md
- https://uifino.com/videos/motion-text-prompt-then-conditions/source/PROMPT.md
- https://uifino.com/videos/motion-text-prompt-then-conditions/source/NOTICE.md
- https://uifino.com/videos/motion-text-prompt-then-conditions/source/project/assets/fonts/OFL.txt
- https://uifino.com/videos/motion-text-prompt-then-conditions/source/project/compositions/conditions.html
- https://uifino.com/videos/motion-text-prompt-then-conditions/source/project/hyperframes.json
- https://uifino.com/videos/motion-text-prompt-then-conditions/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.0 KB |
| SPEC.md | doc | 6.4 KB |

### PROMPT.md

```md
# PROMPT：motion-text-prompt-then-conditions

## 照抄复刻
用 `/hyperframes` 做一条 1920×1080、30 fps、5.5 秒的动效：深色底上先整句落下一句需求，停稳后三条条件逐条补在下面，整组每补一条都重新垂直居中。

1. 画面：底色 `#0E0E10`，需求整句字色 `#F4F4F2`，条件行字色 `#8A8A8E`，行首短竖线颜色 `#F2B544`。纯色背景，没有任何其他元素。字体用本地 `@font-face`：西文 IBM Plex Sans，中文 Noto Sans SC。
2. 字号：需求整句 120px，字重 600，字距 -0.01em，行高 150px；条件行 36px，字重 400，行高 52px。整句按长度缩：估算宽度 em = 中文字和全角标点每个 1 + 英文字母每个 0.56 + 空格每个 0.25，字号 = min(120, floor(1440 / em))，行高不变。
3. 版式：左边距 240px、左对齐。整组竖向（相对整组顶端）：整句 0–150，间距 56，条件行 206–258、278–330、350–402（行高 52，行距 20）。整组最终高 402，容器 `top` = 339。条件行最左是 2px 宽、36px 高的直角短竖线，与文字相隔 20px。
4. 整句入场：放进 150px 高、`overflow: hidden` 的遮罩框里，从框的下沿升到原位，0.5 秒，`power2.out`，0.30 秒开始，0.80 秒落定。0.30 秒之前画面只有底色，整句不能提前露出。落定后停 1.0 秒。
5. 补条件：1.80、2.30、2.80 秒各补一条（间隔 0.5 秒）。每条从左 24px 滑到原位，同时不透明度 0 到 1，0.4 秒，`power2.out`。
6. 整组让位：每条开始滑入的同一时刻，整组一起上移，0.4 秒，`power2.out`。整组纵向偏移（向下为正）依次是 126、72、36、0px（补 0、1、2、3 条时），即每步上移 54、36、36px，保证整组始终垂直居中，已有内容不瞬间跳位。
7. 3.20 秒第三条落定，之后整组完全静止到 5.5 秒。
8. 禁止：逐字打字、勾选框、表情、编号、阴影、渐变、光晕、小标签。

需要替换的地方（在 `index.html` 里 `id="conditions"` 的挂载元素上写 `data-variable-values='{"prompt":"Make a 30-second launch film","cond1":"Vertical 9:16","cond2":"Chinese and English captions","cond3":"End on the URL"}'` 传入；换成别的汉字后要重新生成字体子集，否则缺字）：
- 四行文案 `prompt`、`cond1`、`cond2`、`cond3`（默认「给新品做一支 30 秒发布片」「竖版 9:16」「中英双字幕」「结尾停在网址」）。
- 颜色：`bg`、`ink`、`muted`、`accent`。
- 字号上限 `fontSize`（120）。
- 时间：`firstAt`（0.3）、`promptDuration`（0.5）、`hold`（1.0）、`gap`（0.5）。
- 动作：`slide`（24）、`shiftDuration`（0.4）。
- 不要加产品界面和其他文字。

## 只学手法
需求整句先从遮罩下沿升入（0.5 秒，`power2.out`）并停 1.0 秒，再每隔 0.5 秒从左 24px 补一条小两档的次要色条件；每补一条，整组在同样的 0.4 秒（`power2.out`）里上移新增高度的一半，始终垂直居中，最后静止 2.3 秒。
```

### SPEC.md

```md
# SPEC：motion-text-prompt-then-conditions

## LOOK
- 色值（中性色 3 个，强调色 1 个）：底 `#0E0E10`，需求整句字色 `#F4F4F2`，条件行字色 `#8A8A8E`，强调色 `#F2B544` 只给三根行首短竖线（面积远小于 1%）。BRIEF 里的线色 `#26262A` 没有用到：画面不画分隔线。背景纯色，没有渐变、光晕、网格。
- 字体：西文 IBM Plex Sans（`assets/fonts/ibm-plex-sans.woff2`），中文 Noto Sans SC（`assets/fonts/noto-sans-sc.woff2`），本地 `@font-face`，门禁按用到的字生成子集，OFL 许可。西文排前，中文兜底。
- 字号（两档）：需求整句 120px，字重 600，字距 -0.01em，行高固定 150px；条件行 36px，字重 400，行高 52px。两档在手册推荐的 120 / 64 / 36 / 28 阶梯上相隔两档（120 → 64 → 36）。需求整句按长度自动缩小，保证不超过 1440px 宽：估算宽度 em = 中文字和全角标点每个 1 + 英文字母每个 0.56 + 空格每个 0.25，字号 = min(120, floor(1440 / em))。中文版约 11.6 em，取 120px；英文版约 14.8 em，算出 97px。缩小只改字号，行高仍是 150px，所以整组版式不变。
- 圆角、阴影、图标、编号、勾选框：全部没有。短竖线是 2px 宽、36px 高的直角矩形。
- 版式：左边距 240px，整组左对齐。竖向排布（单位 px，相对整组顶端）：需求整句 0–150，间距 56，条件行 1 为 206–258，条件行之间间距 20，条件行 2 为 278–330，条件行 3 为 350–402。整组最终高 402，容器 `top` 固定 339（= (1080 − 402) / 2）。条件行里短竖线在左，竖线与文字间距 20px，文字从 x = 262 起。

## MOTION
- 需求整句入场：整句放进 150px 高的遮罩框（`overflow: hidden`），文字从框的下沿升到原位（`yPercent` 100 → 0），0.5 秒，`power2.out`，0.30 秒开始，0.80 秒落定。
- 停顿：整句落定后停 1.0 秒，1.80 秒才补第一条。
- 补条件：每条条件从左 24px 滑到原位，同时不透明度 0 → 1，0.4 秒，`power2.out`。条件开始时间 1.80、2.30、2.80 秒（间隔 0.5 秒，0.4 秒动完后留 0.1 秒空当）。
- 整组让位：每条条件开始滑入的同一时刻，整组容器一起上移，0.4 秒，`power2.out`，整组始终垂直居中。容器纵向偏移（相对最终位置，向下为正）：0 条 126px、1 条 72px、2 条 36px、3 条 0px。即三步分别上移 54px、36px、36px，都是新增高度的一半。
- 最后静止：3.20 秒第三条落定，到 5.50 秒完全静止，共 2.30 秒。
- 没有退场、没有运动模糊（最快的移动是 54px 在 0.4 秒内，不需要拖影）、没有逐字打字。

## 逐拍节拍表
| 拍 | 起止秒 | 画面 | 镜头 | 转场 | 屏幕文案原文 |
| --- | --- | --- | --- | --- | --- |
| prompt | 0.00 – 1.80 | 0.30 秒前只有底色；需求整句从遮罩下沿升入，0.80 秒落定，停 1.0 秒 | 固定 | 无 | 给新品做一支 30 秒发布片 |
| cond1 | 1.80 – 2.30 | 第一条从左滑入，整组上移 54px 保持居中 | 固定 | 无 | 竖版 9:16 |
| cond2 | 2.30 – 2.80 | 第二条滑入，整组上移 36px | 固定 | 无 | 中英双字幕 |
| cond3 | 2.80 – 3.20 | 第三条滑入，整组上移 36px，3.20 秒落定 | 固定 | 无 | 结尾停在网址 |
| rest | 3.20 – 5.50 | 整组完全静止 2.30 秒 | 固定 | 无 | 四行全部在画面上 |

英文版屏幕文案：Make a 30-second launch film / Vertical 9:16 / Chinese and English captions / End on the URL。已临时用 `data-variable-values` 传入英文跑过，需求整句缩到 97px，右端约 1580px（不超过 1680px），条件行 36px 不会溢出；测完已改回。

## 参数接线
全部参数都是 `project/compositions/conditions.html` 根元素 `data-composition-variables` 里的变量。用户的 AI 在 `project/index.html` 里 `id="conditions"` 的挂载元素上写 `data-variable-values='{"prompt":"Make a 30-second launch film","cond1":"Vertical 9:16","cond2":"Chinese and English captions","cond3":"End on the URL"}'`（JSON）来覆盖：
- prompt、cond1、cond2、cond3：四行文案。换成别的汉字后要重跑门禁，字体子集才会补上新字。
- bg（#0E0E10）：底色。`index.html` 里的 `#0E0E10` 是写死的兜底色，换底色时一起改。
- ink（#F4F4F2）：需求整句字色。muted（#8A8A8E）：条件行字色。accent（#F2B544）：短竖线颜色。
- fontSize（120）：需求整句字号上限，实际字号见 LOOK。
- firstAt（0.3）：需求整句入场起点。promptDuration（0.5）：整句入场时长（缓动固定 `power2.out`）。
- hold（1.0）：整句落定后到第一条条件之间的停顿。
- gap（0.5）：条件与条件之间的开始间隔。
- slide（24）：条件从左滑入的距离，px。shiftDuration（0.4）：条件滑入和整组让位的时长（缓动固定 `power2.out`，写在脚本里）。
- 写在脚本顶部常量里、没有做成变量的：整组每步让位距离（54 / 36 / 36px，由版式常量算出）、行高和行距。要改行数或行高，就在 `conditions.html` 脚本里改 `ROW`、`ROW_GAP`、`PROMPT_GAP`，容器 `top` 和偏移会自动重算。
总时长 5.5 秒写在 `index.html` 和宿主元素的 `data-duration`，变量改不了它。

## 禁用项
逐字打字、勾选框、表情、编号、已有内容瞬间跳位、条件行比需求还亮、行首短竖线用强调色以外的颜色、阴影、渐变、光晕、小标签和注释、呼吸漂浮循环、点击光圈。

## 已知取舍
- `first_frame_empty`：第 0 帧只有底色，这是整句入场的起点（0.30 秒前）；封面取 4 秒，四行都在。
- 画面朴素：整条只有四行字和三根短竖线，是这个手法本身的样子，用来放进有产品界面的片子里当需求卡。
- 整句升入用 `power2.out`（不用 `power3.out`）：0.5 秒内 150px 的升幅用更陡的曲线会在前 0.2 秒走完大半，肉眼抓不到升入的动作；`power2.out` 让上升过程更看得清。想更明显可把 `promptDuration` 提到 0.7（BRIEF 规定 0.5，默认不动）。
- 条件行 36px 在 1080p 整屏里偏小，是 BRIEF「比需求小两档」的直接结果。手机上看时可把条件行字号提到 44px 以上：同步改 `conditions.html` 里 `.pc-text` 的 `font-size` 和脚本里的 `ROW`（行高随之加大，如 64），容器 `top` 和偏移自动重算，SPEC 里的 402 等高度数字要一起按公式重算。
```
