gestures
Takes various mouse events, and converts them into other events, such as long press, pan, and swipe.
| swipeDirections | Table that converts a normalized vector into swipe directions. |
|---|---|
| run() | Run all gesture functions. |
| stop() | Stop the gesture functions, can be restarted by calling run again. |
| swipe([debug=false]) | Run the swipe manager, with an optional debug variable. |
| longPress([debug=false]) | Run the long press manager, with an optional debug variable. |
| pan([debug=false]) | Run the pan event, which is triggered when the user is dragging on the screen. |
| pan_up([debug=false]) | Run the pan_up manager, which is triggered when a pan event stops happening, and includes the total distance moved with an optional debug variable. |
- swipeDirectionsSource
Table that converts a normalized vector into swipe directions.
- run()Source
Run all gesture functions. This just simply calls them all.
- stop()Source
Stop the gesture functions, can be restarted by calling
runagain.- swipe([debug=false])Source
Run the swipe manager, with an optional debug variable.
Parameters
- debug?
boolean=falseWhether or not debug messages are printed to the screen. Defaults to false.
- debug?
- longPress([debug=false])Source
Run the long press manager, with an optional debug variable.
Parameters
- debug?
boolean=falseWhether or not debug messages are printed to the screen. Defaults to false.
- debug?
- pan([debug=false])Source
Run the
panevent, which is triggered when the user is dragging on the screen.Parameters
- debug?
boolean=falseWhether or not debug messages are printed to the screen. Defaults to false.
- debug?
- pan_up([debug=false])Source
Run the pan_up manager, which is triggered when a pan event stops happening, and includes the total distance moved with an optional debug variable.
Parameters
- debug?
boolean=falseWhether or not debug messages are printed to the screen. Defaults to false.
- debug?