gestures

Takes various mouse events, and converts them into other events, such as long press, pan, and swipe.

swipeDirectionsTable 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 run again.

swipe([debug=false])Source

Run the swipe manager, with an optional debug variable.

Parameters

  1. debug? boolean = false Whether or not debug messages are printed to the screen. Defaults to false.
longPress([debug=false])Source

Run the long press manager, with an optional debug variable.

Parameters

  1. debug? boolean = false Whether or not debug messages are printed to the screen. Defaults to false.
pan([debug=false])Source

Run the pan event, which is triggered when the user is dragging on the screen.

Parameters

  1. debug? boolean = false Whether or not debug messages are printed to the screen. Defaults to false.
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

  1. debug? boolean = false Whether or not debug messages are printed to the screen. Defaults to false.