Creative coding · Tutorial
Deterministic Chart Animation in the Browser: Let the Frame Index Be Your Clock
Argues that animation code should take the frame index as its only clock, not performance.now(), so a frame can be re-rendered, exported to video or debugged at 00:01:47. Shows a pure renderFrame(ctx, frame, scene) and rAF scheduling that never passes the timestamp into the renderer, then edge cases including aligning data by key rather than array index, fonts and colour spaces as hidden nondeterminism, and one renderer feeding two output paths.
Disclosure Labelled AI-assisted by DEV. The author works on animated charts.
Read at source