Fade and rise

The everyday arrival: something fades in as it rises a short way into place.

Rendered video, with motion blur.

0.00 / 0.45 s

Live preview, driven by the code below. No motion blur.

What it does

The item fades up while it rises a short way into its resting place.

Curve

Cubic out

Values

S is the frame's short side, 1080 px at 1080p. Unmeasured inputs in the preview are illustrations, not rules.

FactValue
Purpose
Enter
Acts on
Card, line
Typical length
0.45 s (14 frames at 30 fps)
Caution
Don’t use it for every element in a scene; vary it with Focus in and Settle.
PropertyValue
Rise
2 to 3% S (22 to 32 px)
Duration
0.45 s (13 to 14 frames)
Curve
Ease-out cubic
Opacity
0 to 1 by 60% of the move
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 function fadeAndRise(t: number, start = 0, duration = 0.45, rise = 27) {
  const k = cubicOut(phase(t, start, duration));
  return { y: rise * (1 - k), opacity: phase(t, start, duration * 0.6) };
}

Best practices

Use it forAvoid
Cards, labels and short lines arriving
Every element in a scene; vary it with Focus in and Settle
The parts of a larger build, such as Stagger grid and Logo build
Long rises that read as a slide

Reduced motion: a simple opacity fade over 0.2 s.