Highlight sweep
A marker sweeps behind one phrase to point at it.
Rendered video, with motion blur.
Your headline here
0.00 / 0.45 s
Live preview, driven by the code below. No motion blur.
What it does
A pale bar grows from the left behind one phrase.
Curve
Ease in-out cubic
Values
S is the frame's short side, 1080 px at 1080p. Unmeasured inputs in the preview are illustrations, not rules.
| Fact | Value |
|---|---|
Purpose | Emphasis |
Acts on | Line |
Typical length | 0.4 to 0.5 s (12 to 15 frames at 30 fps) |
Caution | One phrase per scene; a full-strength accent counts towards the accent budget. |
| Property | Value |
|---|---|
Bar | scaleX 0 to 1 from the left |
Duration | 0.4 to 0.5 s |
Curve | Ease in-out |
Colour | A pale tint of the accent or a neutral, behind the text |
Export samples | 12; 1 when still |
Starting values from research. Measure against a reference before relying on them.
Code
ts
export const seg = (t: number, a: number, b: number) => Math.max(0, Math.min(1, (t - a) / (b - a)));
export const lerp = (a: number, b: number, k: number) => a + (b - a) * k;
export const out = (k: number) => (k >= 1 ? 1 : 1 - Math.pow(2, -10 * k));
export const io = (k: number) => (k < 0.5 ? 16 * k ** 5 : 1 - Math.pow(-2 * k + 2, 5) / 2);
export const inn = (k: number) => k * k * k;
export const cubicOut = (k: number) => 1 - Math.pow(1 - k, 3);
export const h = (i: number, j: number) => { const x = Math.sin(i * 127.1 + j * 311.7) * 43758.5453; return x - Math.floor(x); };
export const phase = (t: number, start = 0, duration = 0.6) => seg(t, start, start + duration);
export const easeInOut = (p: number) => p < 0.5 ? 4 * p ** 3 : 1 - (-2 * p + 2) ** 3 / 2;
export const highlightSweep = (t: number, start = 0) => ({ scaleX: easeInOut(phase(t, start, 0.45)) });Best practices
| Use it for | Avoid |
|---|---|
One key phrase in a line | More than one phrase per scene |
Pointing at a figure in a sentence | A full-strength accent, which counts towards the film's accent budget |
Reduced motion: a simple opacity fade over 0.2 s.