Motion study

Streaming Log Follow

Loading…
Scene

Overview

Type lines with CSS. When content exceeds the viewport, lerp the scroller toward the newest line.

Build

  1. 01

    CSS typewriter per line.

  2. 02

    Measure content height vs viewport.

  3. 03

    Lerp scrollY toward the tail.

  4. 04

    Optional fade of the scene at the end.

el.addFrameTask((t) => {
  const y = lerp(y, contentH(t) - viewH, 0.35)
})
Example source React / TSX

examples/streaming-log-follow.tsx · Uses the catalog’s shared composition helpers.

Loading source…