Swingers
Posted: Thu Dec 10, 2009 2:40 pm
Here it is, Swingers, my new gestures lib, 0.6.0 (and probably works on 0.5.0 as well), enjoy everybody!
Also, it's MIT/X11 now.
Interface (in table "swingers"):
.lua: 148
.love: 303
Original post
----
Just today (about 1,5 hours ago) I felt like creating a gestures lib, well.. here it is. I've created a small tech demo for you guys, as of now I retain full copyright and I compiled the lib itself.
Before I get people complaining: This was because I wanted to get a demo out, the lib itself isn't ready for release yet.
Anyway, enjoy!
Oh, and I almost forgot to mention: 0.6.0 (EDIT: because it relies on some 0.6.0 features that can't be reproduced in 0.5.0)
Also, it's MIT/X11 now.
Interface (in table "swingers"):
- start(button) - 'starts' the subsystem, the button argument is the trigger button
- checkError() - old, no longer used, but may be recommissioned
- checkGesture() - check if there's a new gesture (ALWAYS do this before getting one, the getters aren't error-checked)
- getGesture() - get a gesture string, uses, u for up, d for down, l for left, r for right, so rdul is right, down, up, left
- getExtGesture() - gets an extended gesture table, contains n, ne, e, se, s, sw, w, nw, so {"e", "s", "n", "l"} would be the same as above
- update() - call this every frame, does all the magic
.lua: 148
.love: 303
Original post
----
Just today (about 1,5 hours ago) I felt like creating a gestures lib, well.. here it is. I've created a small tech demo for you guys, as of now I retain full copyright and I compiled the lib itself.
Before I get people complaining: This was because I wanted to get a demo out, the lib itself isn't ready for release yet.
Anyway, enjoy!
Oh, and I almost forgot to mention: 0.6.0 (EDIT: because it relies on some 0.6.0 features that can't be reproduced in 0.5.0)