Skip to content

feature/swipe#52

Merged
hesprs merged 6 commits intohesprs:mainfrom
babiakrs:feature/swipe
Mar 23, 2026
Merged

feature/swipe#52
hesprs merged 6 commits intohesprs:mainfrom
babiakrs:feature/swipe

Conversation

@babiakrs
Copy link
Contributor

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

@hesprs
Copy link
Owner

hesprs commented Mar 23, 2026

Welcome, Roman!
This is the first PR this project ever received, thanks for your contribution!

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.

@babiakrs
Copy link
Contributor Author

Could you notify (email is great) me when monorepo will be created, I create another PR

@hesprs
Copy link
Owner

hesprs commented Mar 23, 2026

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.

Copy link
Owner

@hesprs hesprs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 pointerNumber in 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: 1 for all pointer swipes.
  • during pointerUp check swipe pointer array to find similar pointer swipes, if found, emit another event with pointerNumber: <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.

@babiakrs
Copy link
Contributor Author

It is already evening for my timezone. So I will check your comments tomorrow. Thanks!

@hesprs hesprs merged commit 46eec09 into hesprs:main Mar 23, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants