Documentation
¶
Overview ¶
swipe-sim drives the /api/debug/swipe endpoint in a loop so you can watch transition smoothness in real time and tune parameters quickly.
Usage:
go run ./cmd/swipe-sim [flags]
Flags:
-addr Backend base URL (default http://localhost:1985)
-dir Swipe direction: left|right|alternate (default alternate)
-duration Drag phase duration in ms (default 200)
-finalize Snap animation duration in ms (default 120)
-steps Drag steps — higher = smoother simulation (default 20)
-velocity Release velocity in px/s; real swipes ~120–500 (default 150)
-count Number of swipes to run, 0 = loop forever (default 0)
-gap Pause between swipes in ms (default 800)
-analyse Connect to WS, capture frames, and print per-frame displacement
and smoothness analysis after each swipe
Examples:
# Rapid alternating swipes — watch in Flutter UI go run ./cmd/swipe-sim # Analyse one swipe: see frame-by-frame displacement and smoothness report go run ./cmd/swipe-sim -dir left -count 1 -analyse # Simulate a fast flick (400 px/s) with analysis go run ./cmd/swipe-sim -dir left -count 1 -velocity 400 -analyse # Tune: slow drag (400ms), many steps, with analysis go run ./cmd/swipe-sim -duration 400 -steps 40 -count 2 -analyse
Click to show internal directories.
Click to hide internal directories.