-
Notifications
You must be signed in to change notification settings - Fork 29
Gesture recognition block #19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gesture recognition block #19
Conversation
Aki-07
commented
Oct 19, 2025
- Introduced an opt-in gesture recognition subsystem: developers can enable it via options.enableGestures() and configure providers, thresholds, and supported gestures.
- Implemented a reusable GestureRecognitionBlock that analyzes WebXR hand joints to detect pinch, open-palm, fist, thumbs-up, point, and spread gestures, emitting consistent start/update/end events other blocks can subscribe to.
- Updated the hands template and README to showcase the new gesture event stream, including simple visual feedback so teams can quickly validate the behavior.
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
057990b to
be36750
Compare
|
Code looks good! I'll test it out on my devices when I get into the office on Monday. |
|
That works! @dli7319 |
|
Thank you Akilesh! @zhongyi-zhou for visibility and double check as well ;) |
|
Very good way to detect gestures using heuristics! Thanks @Aki-07 |
|
Hi Akilesh, I tried it on Quest 3 today. Most of the gestures are working well!
quest3_heuristic_gestures_xrblocks_20251020.mp4For the template, I think it's hard to tell what's going on just based on the color of the cylinder, since a user wouldn't know the mapping between the gesture and the color and both hands affect the cylinder. Some minor nits from me:
|
|
Sure will get the comments resolved EOD tomorrow @dli7319 |
|
Swapped out the old GestureRecognitionBlock for a leaner GestureRecognition, pulled the heuristics into their own module (defaulting to heuristics), tuned the gesture scoring so fists/thumbs-up/point/spread aren’t nearly as flaky anymore, and refreshed the docs while adding a templates/heuristic_hand_gestures sample that shows a live dashboard for each hand, build still passes with npm run build, so holler if the Quest needs more tweaks. do review it @dli7319 |
|
Thanks for the refactoring and the new template. We'll probably need to rework the template in a future PR since any HTML UI won't show up in WebXR.
The heuristics are still somewhat buggy for me.
On the positive side, spread is easier for me to trigger now and pinch is still working well. @ruofeidu Could you also test on Quest 3 to see if it's just me? The same things happen in the simulator: the thumbs up gesture triggers with every prerecorded gesture except thumbs up. Since we have a new template just for the heuristic gestures now, can we revert the hands template? For the main README.md file, could we move the |
|
Thanks! Please delegate this to Xun to test the gestures on Quest -- he should have a spare one or I'll share one in next weeks. |
|
Tried tweaking a bit more. When you get a minute @dli7319 , please re-test on Quest 3 (and the simulator) to see if the confidence curves feel better, happy to keep tweaking if anything still acts up. |
|
The heuristics still need some improvement but we can get this submitted to get the structure in and update the heuristics in future PRs. Thanks for being an early contributor to XR Blocks! |


