Swipe
Swipes drag one or more fingers across the screen.
Configuration
- Swipe Duration (ms): Under Timing Settings. How long the entire swipe takes from start to finish. Slower swipes are more reliable for dragging UI elements.
- Delay Before / Post Wait (ms): Under Flow Control. Custom pauses before or after the swipe executes. (Known as Initial delay and Next action delay in the basic editor).
- Repeat Count: How many times the swipe action should loop.
- Randomize Position (±px): Nudges the swipe's points by up to this many pixels each run, so the same gesture isn't traced pixel-for-pixel every time.
Swipe Builder
- Path Editor: Tap Edit Swipe Paths to open the full-screen canvas. You can drag points, add/remove waypoints, and draw freehand paths. The controls are Add Swipe for another finger, Add Point and Rem Point for waypoints on the current one, and Delete Selected. A counter shows how many swipes you have.
- Multiple Fingers: Add up to 10 simultaneous swipes. They execute at the exact same time, which is how you build pinch, zoom, and other multi-touch gestures.
- Freehand Draw: Tap the pencil icon to record your exact finger movement across the screen.
Advanced Swipes
- Advanced Swipe Settings: If the standard configuration is too restrictive, enable advanced settings and open Advanced Point Settings. Tap a point to configure its coordinates, fixed or sticky scaling, how long the finger should hold there, and how long the move to the next point should take.
- Point holds: Hold At Point (ms) keeps the finger down at that point before the swipe continues, and Duration To Next Point (ms) sets how long the travel to the following point takes. The swipe's total duration is all the holds plus all the move durations added together.
- Per-point scaling: Use Fixed for normal resolution scaling. Use Sticky when a specific point should stay attached to an edge or area, such as a handle near the bottom of the screen.
- Per-point values: Each point's X and Y take more than plain numbers. Use the beside them to point a swipe at a variable or a detection result. The literal coordinate stays put as the fallback if the value can't be worked out.
Code Equivalent
Simple two-point swipe:
swipe(100, 800, 100, 400, { duration: 300, repeat: 1, waitBefore: 0, waitAfter: 0 });Multi-point swipe:
const path = [
{ x: 100, y: 800 },
{ x: 200, y: 700 }, // right
{ x: 100, y: 600 }, // left
{ x: 200, y: 500 }, // right
{ x: 100, y: 400 } // left
];
swipe(path, { duration: 600, repeat: 2 });Advanced swipe with full configuration:
const path = [
{ x: 100, y: 800, hold: 120, move: 300, scale: "sticky", anchor: "bottom" },
{ x: 300, y: 600, hold: 500, move: 250 },
{ x: 100, y: 400, hold: 80, move: 0, scale: "sticky", anchor: "top" }
];
swipe(path, { repeat: 1, waitAfter: 150 });move controls travel time to the next point. On the final point, move: 0 is included only to show the full point shape. Omit scale for fixed ; use scale: "sticky" only when the point should stick to "top", "bottom", "left", or "right".
Multi-finger swipe:
multi.swipe([
[{ x: 100, y: 800 }, { x: 100, y: 600 }, { x: 100, y: 400 }],
[{ x: 300, y: 800 }, { x: 300, y: 600 }, { x: 300, y: 400 }]
], { duration: 500, waitBefore: 100 });