Page 1 of 1
[lib]GestureLib - Gesture library
Posted: Mon Sep 12, 2016 10:43 pm
by Foczkka
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.
More Info about library you can find at my Github.
https://github.com/Hau-Hau/GestureLib-Love2D
Cheers!
Re: [lib]GestureLib - Gesture library
Posted: Thu Sep 15, 2016 12:28 pm
by Ranguna259
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')
function love.load()
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.
Re: [lib]GestureLib - Gesture library
Posted: Mon Jan 09, 2017 4:55 pm
by feodosian
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.
Re: [lib]GestureLib - Gesture library
Posted: Sat Feb 04, 2017 12:06 am
by Foczkka
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!
Re: [lib]GestureLib - Gesture library
Posted: Wed Sep 12, 2018 12:20 am
by Foczkka
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.
Ranguna259, now import works like in your advice
feodosian, right now this ugly bug should not exist
Cheers!