Dev.to WebDev ๐Ÿ›  Dev ๐Ÿ‘ 0 ๐Ÿ“– 4 min read

I recorded 13,808 frames of four motion-heavy websites and counted what makes them feel smooth

"Smooth" and "premium" are where most of us stop when we try to say why a site's motion feels good. So I picked four websites known for their motion, recorded every frame the browser delivered โ€” from the intro to the end

"Smooth" and "premium" are where most of us stop when we try to say why a site's motion feels good. So I picked four websites known for their motion, recorded every frame the browser delivered โ€” from the intro to the end of the scroll, nothing dropped โ€” and counted. 13,808 frames in total.

This post gives the method, the numbers, three patterns they show, and a tiny dependency-free spring/inertia module that writes those patterns down as code. I do not name the sites or reuse their images or text: only ratios and motion principles.

How I measured

Headless Chrome with a GPU, 1440ร—900. For each site, in this order: intro (until the page settles) โ†’ 4 s idle โ†’ 8 s slow cursor movement โ†’ wheel-scroll to the end (max 60 s) โ†’ drag โ†’ 390 px phone width. The median gap between frames was 0.017 s (about 60 fps) on all four.

Measure Definition
Whitespace Split the frame into 8ร—8-pixel blocks; blocks whose brightness std-dev is under 2.5 and that connect to the frame edge, as a share of all blocks
Scene changes Scroll-time change grouped into 0.5 s bins; peaks above 2.5ร— the median
Hard cuts Times the mean brightness difference between neighbouring frames jumped (fades to black, cuts). Swaps between similarly bright images are hard to catch
Cursor response Change while the cursor moves รท change while idle
Intro stages Bursts of fast change (โ‰ฅ12 per second on a 0โ€“100 scale) during the intro
fps From requestAnimationFrame intervals, in a separate load

Sound: the browser was muted; I only counted when a page started audio. I did not listen.

The numbers

A: dark monochrome 3D studio B: light grey 3D studio C: SaaS product site D: 3D studio with a long intro
Frames recorded 3,800 4,683 1,018 4,307
Whitespace 69% 11% 57% 20%
Intro 11.6 s, 2 stages 7.7 s, 2 stages 2.5 s, 2 stages 19.9 s, 5 stages
Cursor response 1.1ร— 2.17ร— 0.23ร— 7.7ร—
Scene changes 5 5 2 0
Hard cuts 0 0 0 5
fps (idle ยท cursor ยท scroll) 33.7 ยท 60 ยท 53.8 60 ยท 60 ยท 59.2 60 ยท 60 ยท 54.8 25.4 ยท 23.9 ยท 56.4
Display : body type not readable (canvas) not readable 4.8 : 1 (72 / 15 px) 3.35 : 1 (144 / 43 px)
Display tracking โ€” โ€” โˆ’0.022em โˆ’0.02em

Scroll fps for A, B and D is not confirmed against scroll position in the same window (C is: 4,536 px moved in the same 5 s).

Three patterns (four sites only โ€” not a general trend)

1. No hard cuts in 3 of 4. A, B and C never cut or faded to black by this measure; scene changes happened without big brightness jumps. D instead builds its world in a 5-stage, ~20 s intro.

2. The two airy sites kept to one colour family. Whitespace split into 69% / 57% and 11% / 20%. A and C put 94โ€“95% of the area into their top two colours. B fills its whole first screen with one canvas.

3. Respond only where it matters. D changes 7.7ร— more while you move the cursor, B 2.17ร—, A 1.1ร—. C is 0.23ร— โ€” quieter while you move (my guess: idle decoration outweighs it; not verified).

The patterns as code

// motion_core.js โ€” the measured patterns as small motion parts (no dependencies, MIT)
// 1) Spring: stiffness 420 / damping 30 / mass 1. Moves, then settles (small overshoot, quick rest)
// 2) Inertial scroll: close a fixed share of the gap each frame (exponential decay). Stop drawing once at rest
// 3) Hard-cut check: find frames that swap most of the screen at once

export function spring({ stiffness = 420, damping = 30, mass = 1, from = 0, to = 1 } = {}) {
  let x = from, v = 0, carry = 0;
  const dt = 1 / 240; // semi-implicit Euler in fixed 1/240 s steps; the remainder carries to the next frame
  const api = {
    set target(t) { to = t; },
    step(frameSeconds = 1 / 60) {
      carry += frameSeconds;
      while (carry >= dt - 1e-9) {
        const a = (-stiffness * (x - to) - damping * v) / mass;
        v += a * dt;
        x += v * dt;
        carry -= dt;
      }
      if (Math.abs(x - to) < 1e-3 && Math.abs(v) < 1e-3) { x = to; v = 0; } // snap exactly to the target at rest
      return x;
    },
    jump(t) { x = to = t; v = 0; carry = 0; return x; }, // move instantly, e.g. for reduced motion
    get value() { return x; },
    get resting() { return x === to && v === 0; },
  };
  return api;
}

// Inertia: close k of the gap per 60 fps frame, corrected by elapsed time so jittery frames keep the same speed
export function inertia({ k = 0.1 } = {}) {
  let pos = 0, target = 0;
  return {
    set target(t) { target = t; },
    step(frameSeconds = 1 / 60) {
      const kk = 1 - Math.pow(1 - k, frameSeconds * 60);
      pos += (target - pos) * kk;
      if (Math.abs(target - pos) < 0.05) pos = target;
      return pos;
    },
    jump(t) { pos = target = t; return pos; },
    get value() { return pos; },
    get resting() { return pos === target; },
    // seconds until rest (gap from start to under 0.05)
    settleSeconds(start = 1000) { return Math.log(0.05 / start) / Math.log(1 - k) / 60; },
  };
}

// Hard cut: mean difference of two grey frames (Uint8Array) above 25 on a 0โ€“100 scale
export function hardCut(a, b, limit = 25) {
  let s = 0;
  for (let i = 0; i < a.length; i++) s += Math.abs(a[i] - b[i]);
  return (s / a.length / 255) * 100 > limit;
}

Results from running it in Node (60 fps, one frame at a time):

  • Spring 420/30 (0 โ†’ 1): 2.61% overshoot, rests after 38 frames (0.633 s) โ€” the value for this 1/240 s semi-implicit Euler stepping (the continuous formula for damping ratio 0.73 gives about 3.4%)
  • Inertia k = 0.1 (1000 px): rests after 94 frames (1.57 s), matching log(0.05/1000)/log(0.9)/60
  • Frame jitter: stepping by 16.8 ms for one second lands where 1/60 s steps land (the remainder carries over)
  • hardCut: true for brightness 10 โ†’ 200, false for identical frames

Damping 30 is a damping ratio of 30 / (2โˆš420) โ‰ˆ 0.73: a little overshoot, then stillness. For prefers-reduced-motion: reduce, call jump(target) and skip the animation loop.

What I could not measure

  • Type inside a canvas (A, B)
  • Sound beyond "audio started"
  • fps on other machines โ€” these are from one Mac's headless Chrome
  • The four were chosen because I think their motion is good, not at random

I build interactive launch pages at FORMA; the measurements above are what I now design to. If you want to see them applied: ORBIT OS, HALDEN, and KAZE (free download).

AI disclosure: AI assisted with the measurement scripts, the tallying and the first draft. The code results come from running it locally in Node; the site numbers come from the recordings.

๐Ÿ“ฐ Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes โ€” full credit and traffic to the original publisher.