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!
[lib]GestureLib - Gesture library
[lib]GestureLib - Gesture library
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:
This makes thing cleaner and easier for your users.
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
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.
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!
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
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!
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!
Who is online
Users browsing this forum: Bing [Bot] and 3 guests