-
Notifications
You must be signed in to change notification settings - Fork 48
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
Add support for a PCM buffer to the gamepad actuator #186
Comments
@marcoscaceres what is the best way to move forward on this? A PR on the spec? |
We want to move away from supporting gamepad haptics with GamepadHapticActuator and adopt a new strategy that can work for other (non-gamepad) haptic devices. We'll keep GamepadHapticActuator as a legacy API to support "dual-rumble" haptics but we don't plan to add support for buffered haptics or other new effect types. The next step is to draft a specification for HapticsDevice API, then create a PR to integrate HapticsDevice into Gamepad API. |
@nondebug that explainer was written 2 years ago and doesn't cover the case where we want to pass any waveform. I agree that the current haptics interface isn't great but I don't see a need to completely replace it. |
@bmathwig can you comment on whether this is in scope for HapticsDevice API? Supporting custom haptic waveforms is explicitly listed in the explainer's goals so I think this is intended to be supported in the API although that part of the spec hasn't been worked on yet. |
Looking at the proposal, |
PointerEvent integration is for supporting pointing devices with tactile feedback like Microsoft Surface pens. Gamepad integration wouldn't use PointerEvent. Probably we'd have an attribute that returns an array of HapticsDevices representing the actuators on the device. |
Cool but that sounds a lot like the HapticActuators array we have today (and have to maintain). |
That sounds good. What is a realistic timeframe? Since we're already selling hardware with these capabilities, we'd like to have it as soon as possible. |
I'm planning on picking up the |
There hasn't been an update from @bmathwig since that last message :-\ |
Ben is no longer working on this. I reached out to @SteveBeckerMSFT and @gabrielsanbrito to see if they can pick it up. @qqharryhwang presented on haptics APIs at TPAC and may also be interested. |
The Quest Pro controller comes with a new VCM motor for haptics that has a variable frequency and intensity. The OpenXR API is documented here
We'd like to expose this to WebXR developers so they can generate more immersive haptics and would like to propose the following function to the GamepadHapticActuator IDL:
Promise<GamepadHapticsResult> playPCM(audioBuffer);
cc @nondebug
The text was updated successfully, but these errors were encountered: