Conversation
…er processing logic to a separate method
|
Welcome, Roman! Swipe feature is the very feature that Pointeract lacks, I've been planning to add this feature for a long time. Your implementation and understanding of SynthKernel are solid, I will review deeper and merge this night (4-5 hours later). P.S. About the Angular version you mentioned in your email, I think it is a better choice to make Pointeract a monorepo which contains the Pointeract core and all adaptors (including your Angular one). This can make future development much easier (like how I recently converted my another vanilla TS library into core + adaptors). The conversion will be effortless and done very soon. |
|
Could you notify (email is great) me when monorepo will be created, I create another PR |
|
No problem and I appreciate your patience. Today I got more than expected other stuff to finish, the merge will happen once those tasks are over. And also, I will email you when the monorepo restructure is finished. |
There was a problem hiding this comment.
Totally fine, but there are small suggestions.
Seems that swipe detection processes swipe at per-pointer level. Consider adding multiple-pointer-single-swipe detection (my sketchy mental model, reference only):
- add a new field
pointerNumberin swipe event to record number of pointers involved in one swipe. - keep each pointer in the swipe pointer array for a short time even after
pointerUp. - emit events with
pointerNumber: 1for all pointer swipes. - during
pointerUpcheck swipe pointer array to find similar pointer swipes, if found, emit another event withpointerNumber: <more than 1>. - that is to say, a swipe caused by a pointer can emit multiple swipe events if similar patterns are found.
Also, consider expose more information in swipe event, like duration, displacement and extend the direction to eight directions if possible.
Overall, this PR is thorough and nicely implemented. Able to merge. Above suggestions are minor enhancements that don't have to be shipped right now.
|
It is already evening for my timezone. So I will check your comments tomorrow. Thanks! |
Hello, Hēsperus!
Some library enhancement :)
P.S. I don't have any idea how to add swipe to the playground without extending it with another example ¯_(ツ)_/¯
P.P.S Check your email, I wrote you about Angular library based on Pointeract