function RollDown(){
let delay1 = delay2 = 0
let duration1 = duration2 = 300
let x1 = x2 = device.width/2*0.9
let x3 = x4 = device.width/2*1.1
let y1 =y3= device.height*0.7
let y2 = y4 = device.height*0.3
gestures([delay1, duration1, [x1, y1], [x2, y2]], [delay2, duration2, [x3, y3], [x4, y4]])
}
function RollUp(){
let delay1 = delay2 = 0
let duration1 = duration2 = 300
let x1 = x2 = device.width/2*0.9
let x3 = x4 = device.width/2*1.1
let y1 =y3= device.height*0.3
let y2 = y4 = device.height*0.7
gestures([delay1, duration1, [x1, y1], [x2, y2]], [delay2, duration2, [x3, y3], [x4, y4]])
}
RollDown函数可实现下滚,RollUp函数上滚。gesture为多手势同时模拟,格式为:
gestures([delay1, duration1, [x1, y1], [x2, y2], ...], [delay2, duration2, [x3, y3], [x4, y4], ...], ...)
这里用gesture模拟双指滑动