Gestures

About Gestures

Type: Gideros class
License: BSD License
Supported platforms:

       

Categories:
  • Algorithms
  • User Input

Gideros Gestures object provides a way to define and detect gestures. You can define your own gestures, by providing array of points, that defines shape and provide callback function for each shape.

It is also possible to detect gestures from provided array of points.

Additionally this class can automatically track touch inputs to gather collection of points and resolve it automatically, and automatically output what user draws in real time.

Package contains Gestures.lua and example Gideros application project.

Code example:

 
gest:addGesture('Line', {
    {x = 0, y = 0},
    {x = 0, y = 100}
}, callback)
 
gest:addGesture('Square', {
    {x = 0, y = 0},
    {x = 200, y = 0},
    {x = 200, y = 200},
    {x = 0, y = 200},
    {x = 0, y = 0}
}, callback)
				

Gestures video