[lib]GestureLib - Gesture library

Showcase your libraries, tools and other projects that help your fellow love users.
Post Reply
User avatar
Foczkka
Prole
Posts: 3
Joined: Mon Sep 12, 2016 10:05 pm

[lib]GestureLib - Gesture library

Post by Foczkka » Mon Sep 12, 2016 10:43 pm

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. :awesome:

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.

User avatar
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

Post by Ranguna259 » Thu Sep 15, 2016 12:28 pm

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.
LoveDebug- A library that will help you debug your game with an on-screen fully interactive lua console, you can even do code hotswapping :D

Check out my twitter.

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

Re: [lib]GestureLib - Gesture library

Post by feodosian » Mon Jan 09, 2017 4:55 pm

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.

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

Re: [lib]GestureLib - Gesture library

Post by Foczkka » Sat Feb 04, 2017 12:06 am

Thanks for feedback!

I am sorry guys for abandon project for almost half a year!
Now I see, it could, be made much better :roll:
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!

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

Re: [lib]GestureLib - Gesture library

Post by Foczkka » Wed Sep 12, 2018 12:20 am

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. :nyu:

Ranguna259, now import works like in your advice :cool:

feodosian, right now this ugly bug should not exist :awesome:

Cheers!

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests