Screen:multiSwipe()
Perform up to 10 fingers swipe simultaneously to the screen. Each finger operates on its own independent timeline — touching down, moving, holding, and lifting according to its own parameters.
Signature
Screen:multiSwipe(fingers: List<List<SwipePoint>>): void
Returns
void
Compatible Version: 1.0.0.26 and up
Parameters
| Parameter | Type | Description |
|---|---|---|
| fingers | List<List<SwipePoint>> | A list of finger paths. Each finger path is a list of SwipePoint values. Minimum 2 points per finger. Maximum 10 fingers. |
SwipePoint Behavior in multiSwipe
Each finger path is a list of SwipePoint(x, y, holdDuration, swipeDuration). The meaning of each parameter depends on the point's position in the list:
First point (start position):
swipeDuration— Initial delay in milliseconds before the finger touches downholdDuration— How long to hold at the start position before moving
Subsequent points (move targets):
swipeDuration— Duration in milliseconds to travel from the previous point to this pointholdDuration— How long to hold at this point after arriving
Last point:
holdDuration— Trailing hold at the final position before the finger lifts
info
All fingers lift together after the longest finger's actions complete.
Examples
Two-finger swipe up
Screen:multiSwipe({
{
SwipePoint(500, 800, 50, 0),
SwipePoint(500, 400, 50, 1000),
},
{
SwipePoint(600, 800, 50, 0),
SwipePoint(600, 400, 50, 1000),
},
})
Both fingers swipe upward simultaneously over 1 second.
Pinch to zoom
Screen:multiSwipe({
{
SwipePoint(400, 600, 50, 0),
SwipePoint(200, 400, 50, 1500),
},
{
SwipePoint(600, 600, 50, 0),
SwipePoint(800, 800, 50, 1500),
},
})
Two fingers move apart from the center over 1.5 seconds.
Staggered start with hold
Screen:multiSwipe({
{
SwipePoint(935, 1533, 50, 2000),
SwipePoint(658, 1234, 5000, 2000),
SwipePoint(207, 1372, 50, 2000),
},
{
SwipePoint(794, 1714, 50, 3000),
SwipePoint(240, 1489, 50, 2000),
SwipePoint(694, 1170, 50, 2000),
},
})
Timeline:
| Time | Finger 1 | Finger 2 |
|---|---|---|
| 0ms | Sleeping (2000ms) | Sleeping (3000ms) |
| 2000ms | Press down at (935, 1533) | Sleeping... |
| 2050ms | Moving to (658, 1234) | Sleeping... |
| 3000ms | Moving... | Press down at (794, 1714) |
| 3050ms | Moving... | Moving to (240, 1489) |
| 4050ms | Arrive, hold 5000ms | Moving... |
| 5050ms | Holding... | Arrive, hold 50ms |
| 5100ms | Holding... | Moving to (694, 1170) |
| 7100ms | Holding... | Arrive, hold 50ms |
| 9050ms | Moving to (207, 1372) | Waiting... |
| 11050ms | Arrive, hold 50ms | Waiting... |
| 11100ms | All fingers lift together |
Limits
- Maximum 10 fingers
- Each finger must have at least 2 SwipePoint values
- Total gesture duration must not exceed approximately 60 seconds
swipeDurationof0on the first point is treated as1ms(essentially instant)