Skip to main content

Module animation

Module animation 

Source
Expand description

Animation capture module (R2).

Captures web animations as sequences of screenshots with loop detection based on pixel similarity comparison.

Supports three capture modes (concept):

  • screencast: CDP-based push capture (30-60 FPS, Chromium only)
  • beginframe: Deterministic frame-perfect capture (Chromium only)
  • screenshot: Polling-based capture (3-8 FPS, cross-browser)

Note: Full animation capture requires browser automation (browser-commander). This module provides the core logic; browser integration is stubbed until browser-commander is fully available.

Based on reference implementation from: https://github.com/link-foundation/meta-theory/blob/main/scripts/capture-animation.mjs

Structs§

AnimationCaptureResult
Result of animation capture.
AnimationOptions
Options for animation capture.
Keyframe
A captured keyframe.

Enums§

AnimationFormat
Output format for animation.
CaptureMode
Capture mode for animation.

Functions§

capture_animation_frames
Capture animation frames from a web page.
compare_frames
Compare two frame buffers for pixel similarity.