Motion comparison

What MotionPR compares between baseline and candidate, record by record, and how each difference is measured.

On this page
  1. Animations
  2. Stagger
  3. Timelines, scroll and pixels
  4. Structure
  5. Measurement labels
  6. Environment checks

motionpr compare (and the comparison step of motionpr run) pairs scenarios by id and viewport, checkpoints by label, and records by identity, then compares each pair. Every difference it finds is a change with before, after, a delta and unit where both sides are numbers, a measurement label, a severity and the rule that produced it.

Interactive diff viewer: needs JavaScript.

The list above is the real result of comparing the demo app's two variants: 55 differences across 11 scenarios (1 critical, 35 warnings, 18 info, 1 uncertain).

Animations

ChangeCompared fromRule
Duration, delay, end delayDeclared timingduration, delay, end-delay
Start offset after the triggerstartTime, frame-quantizedstart (at most a warning)
Easing65-sample curves (Easing analysis)easing
Iterations, direction, playback rateDeclared timingiterations, direction, playback-rate
Fill modeDeclared timingfill
Properties added or removedThe animated property setproperty-added, property-removed
Keyframe valuesDeclared start and end values of non-transform propertieskeyframes
TrajectorySampled translate and rotate: start, end and path deviationtrajectory
Opacity, scale, sizeSampled opacity, scale and layout boxopacity, size
Animation added or removedRecords without a partneranimation-added, animation-removed

Relative timing changes are measured against the baseline duration for durations, and against the animation's duration for delays and start offsets. Path comparisons use the sampled values at the same progress; when the two captures used different capture.samples, only the endpoints are compared and the comparison says so (SAMPLE_COUNT_DIFFERS).

Stagger

Siblings that animate the same way form a stagger family: the same type, name and properties, and element keys that differ only by a trailing number (test-id:work-card-1, -2, …), or one GSAP/Anime.js tween with several targets. MotionPR measures the median interval between their start times and compares it.

Interactive stagger: needs JavaScript.

The demo's work grid goes from 70 ms to 120 ms between cards. MotionPR reports one stagger difference (Stagger interval 70ms → 120ms across 6 elements, a warning) next to the per-card delay changes it explains.

Timelines, scroll and pixels

  • Timelines (GSAP, Anime.js): duration, repeat, speed, labels that moved, appeared or disappeared, reordered labels.
  • Scroll (Lenis): start, end and target position, settle duration, the normalized progress curve, peak velocity, overshoot, direction changes, smooth-scroll lag and engine options. Scroll-linked GSAP animations are compared by their progress at the same scroll position.
  • Pixels (Visual comparison): the settled screenshot of each checkpoint, and per-frame divergence of the filmstrips.

Structure

Scenarios and checkpoints that appear or disappear are differences too (scenario-added, scenario-removed, checkpoint-added, checkpoint-removed), and a scenario that failed in the candidate is critical (scenario-failed). The latency between the trigger and the first motion is compared within timing.startToleranceMs, when both captures name the same trigger (step and kind).

Measurement labels

LabelMeaning
measuredRead directly from both captures (declared timing, sampled computed styles)
estimatedDerived with a tolerance; start times and latency are frame-quantized
incompleteAt least one side has partial capture data
unsupportedThe comparison cannot be made for this animation type

Environment checks

The comparison warns when the two captures are not like for like: BROWSER_VERSION_DIFFERS, PLATFORM_DIFFERS (fonts render differently across operating systems) and CONFIG_DIFFERS. These never change a severity; they explain one.

Severities and how to change them: Severity. The JSON format of the result: Capture serialization.