Fan out
Lays out a few options, then drops the ones not chosen, so the choice is obvious.
Rendered video, with motion blur.
0.00 / 2.40 s
Live preview, driven by the code below. No motion blur.
What it does
Stacked cards spread in depth, then side cards drop away from the choice.
Curve
Expo out
Values
S is the frame's short side, 1080 px at 1080p. Unmeasured inputs in the preview are illustrations, not rules.
| Fact | Value |
|---|---|
Purpose | Enter, exit |
Acts on | Group |
Typical length | 2.4 s (72 frames at 30 fps) |
Caution | Never drop the chosen card. |
| Property | Value |
|---|---|
Perspective | 1.85 S (2000 px) |
Start Z | -37% S (-399.6 px) |
RotateX | 62 to 0 deg |
Side X | ±55% S (590 px) |
Side rotateY | ∓16 deg |
Arrival | 1.05 s, 0.12 s apart |
Side fall | 65% S (702 px), rotateZ ±14 deg |
Drop | 0.45 s, 0.08 s apart |
Chosen Z | +15% S (162 px) |
Export samples | 12; 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 fanOut(t: number, index = 0, chosen = 1, chooseAt = 1.8) {
const k = out(phase(t, index * 0.12, 1.05));
const side = index - 1;
const dropIndex = index < chosen ? index : index - 1;
const exit = phase(t, chooseAt + Math.max(0, dropIndex) * 0.08, 0.45);
const pick = out(phase(t, chooseAt, 0.45));
return { x: side * 590 * k, y: index === chosen ? 0 : 702 * exit, z: -399.6 * (1 - k) + (index === chosen ? 162 * pick : 0), rotateX: 62 * (1 - k), rotateY: -side * 16 * k, rotateZ: index === chosen ? 0 : side * 14 * exit, opacity: index === chosen ? 1 : 1 - exit, perspective: 2000 };
}Best practices
| Use it for | Avoid |
|---|---|
Choosing one card | Dropping the chosen card |
Comparing a small set | Flat simultaneous arrivals |
Reduced motion: a simple opacity fade over 0.2 s.