Skip to content
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

Examples: Added vr haptics example #20000

Merged
merged 7 commits into from Aug 25, 2020
Merged

Examples: Added vr haptics example #20000

merged 7 commits into from Aug 25, 2020

Conversation

fernandojsg
Copy link
Collaborator

@fernandojsg fernandojsg commented Aug 3, 2020

Firefox Reality, Firefox Desktop and Oculus Browser already implements HapticsActuators as part of the Gamepad extensions API (https://w3c.github.io/gamepad/extensions.html).
This examples uses the pulse to vibrate the controllers with different intensity depending on which box you are hitting.
image

Currently the example is using the current WebXRController api as is, so I used the connected event to grab the inputSource and gamepad and then call pulse on it.
I'd like to have more direct access to these two and implement it as controller.vibrate(intensity, duration) instead. I created another Draft PR (#19999) to try to expose these in a different way, if that one will get merged, I'll do a refactor on this one too.

@mrdoob mrdoob added this to the r120 milestone Aug 3, 2020
@mrdoob mrdoob changed the title Adding haptics example Examples: Added vr haptics example Aug 25, 2020
@mrdoob mrdoob merged commit e04cb23 into mrdoob:dev Aug 25, 2020
@mrdoob
Copy link
Owner

mrdoob commented Aug 25, 2020

Thanks!

@fernandojsg fernandojsg deleted the hapt branch August 26, 2020 17:12
@bl-ue
Copy link

bl-ue commented May 12, 2021

20k! 🎉

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.

None yet

3 participants