## [lib]GestureLib - Gesture library

Foczkka
Prole
Posts: 3
Joined: Mon Sep 12, 2016 10:05 pm

### [lib]GestureLib - Gesture library

Hi guys

I made port of my Haxe gesture library to Love2D.
Lib supports gestures like swipe, tap, and long press, but i dont have in plans multitouch gestures for Love2D.

https://github.com/Hau-Hau/GestureLib-Love2D

Cheers!
Last edited by Foczkka on Wed Sep 12, 2018 12:19 am, edited 1 time in total.

Ranguna259
Party member
Posts: 911
Joined: Tue Jun 18, 2013 10:58 pm
Location: I'm right next to you

### Re: [lib]GestureLib - Gesture library

You should wrap all the globals that are injected into the environment into a single table which would be required through a single file, something like this:

Code: Select all

gestures = require('gestures')
gSwipeN = gestures.swipe('[TP,N,TR]', -1, 500)
gLongPress = gestures.longPress(1000, false)
end

function love.update(dt)
gestures:update(dt)
-- or
gSwipeN:update(dt)
-- and so on
end
This makes thing cleaner and easier for your users.
LoveDebug- A library that will help you debug your game with an on-screen fully interactive lua console, you can even do code hotswapping

feodosian
Prole
Posts: 4
Joined: Mon Jun 18, 2012 8:29 am

### Re: [lib]GestureLib - Gesture library

Strange, but test app recognize gestures in iOS port incorrectly. E.g. you do double tap, but it looks like it doesn't stop recognizing this gesture. Problem is reproducible in iphone 5s simulator. Anyway, thx to author. I'll try to fix the problem. But people should be aware of such bahaviour.

Foczkka
Prole
Posts: 3
Joined: Mon Sep 12, 2016 10:05 pm

### Re: [lib]GestureLib - Gesture library

Thanks for feedback!

I am sorry guys for abandon project for almost half a year!
Now I see, it could, be made much better
Last time I have tons of work, but in free time i have in plans remade project, and maybe made this from scratch.

Ranguna259, thanks for this tip!

feodosian, oh man, good to know that issue. If you find where is bug, you can post this at that thread, and then I will include bugfix in next version!

Cheers!

Foczkka
Prole
Posts: 3
Joined: Mon Sep 12, 2016 10:05 pm

### Re: [lib]GestureLib - Gesture library

Hello guys!

After two years after first post, library was rewritten, refactored and redesigned.
One of biggest changes for users is that I removed ugly :check function, and I replaced them by elegant onSuccess callback.

It is certain that on this forum is better library for gesturing, but regardless of it I'm very happy because I found some time for this refactor.