Speed ramp
Starts slow and gathers pace, so a sequence feels like it is accelerating.
Rendered video, with motion blur.
0.00 / 3.00 s
Live preview, driven by the code below. No motion blur.
What it does
A held first item settles before the sequence gathers pace.
Curve
Power 1.8
Values
S is the frame's short side, 1080 px at 1080p. Unmeasured inputs in the preview are illustrations, not rules.
| Fact | Value |
|---|---|
Purpose | Build |
Acts on | Group |
Typical length | 3 s (90 frames at 30 fps) |
Caution | Hold the first item before the ramp; never start at full speed. |
| Property | Value |
|---|---|
Distance | k · (t - t0)^1.8 after t0 |
First item | Held settle before the ramp |
k and t0 | Caller supplied; not measured |
Speed blur | Blur grows with speed, p^1.6, up to 1.1% S |
Export samples | 24 (fast window); 1 when still |
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 function speedRamp(t: number, t0: number, k: number) {
return { distance: k * Math.max(0, t - t0) ** 1.8 };
}
export const settle = (t: number, A = 220) => A * Math.exp(-3.8 * Math.max(0, t));
export function speedBlur(t: number, start: number, duration: number) {
return { blur: 12 * phase(t, start, duration) ** 1.6 };
}Best practices
| Use it for | Avoid |
|---|---|
A sequence gathering pace | Starting at full speed |
A moving ground track | A constant sequence pace |
Reduced motion: a simple opacity fade over 0.2 s.