Skip to content

How it works

Source README.md · versioncam 0.5.3 from npm

Five decisions make a recording repeatable.

Time is authored, not measured. The script declares the timeline. The driver steps the app through it one output frame at a time: it advances the page’s fake clock by exactly 1/fps, then captures. Anything slow, such as a query, a map tile or a model, happens inside a settle(). A settle advances the clock but captures nothing, so the wait never reaches the video.

The cursor is real input with a synthetic glyph. Headless Chrome draws no pointer. So the driver moves the real mouse along a planned path, and hover and press states really fire in the captured frames. It records that path as data. The glyph, the press and the ripple are drawn later at output resolution, so the look can change without recording again.

Motion is modelled. Minimum-jerk profiles, slight Bézier arcs, Fitts-law durations and a dwell before each click. All of it is seeded, so it never looks metronomic and never differs between runs.

Rendering needs nothing running. The page, the recording, the config and your scenes are served from an in-memory route table. versioncam render needs only a recording on disk and a browser.

Output follows the viewport. Record at 1440×900 and the video is 16:10. For 16:9, record at 1600×900. Nothing is letterboxed or cropped. A backdrop, a device frame and padding are available through theme.presentation, and are off by default.