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

Add improved Rumble API: weak / strong magnitude, delayed start, and duration in ms #83

Closed
ricardoquesada opened this issue Mar 17, 2024 · 1 comment

Comments

@ricardoquesada
Copy link
Owner

similar to Web API: https://developer.mozilla.org/en-US/docs/Web/API/GamepadHapticActuator/playEffect

const gamepad = navigator.getGamepads()[0];

gamepad.vibrationActuator.playEffect("dual-rumble", {
  startDelay: 0,
  duration: 200,
  weakMagnitude: 1.0,
  strongMagnitude: 1.0,
});
ricardoquesada added a commit that referenced this issue Mar 17, 2024
Implemented for Stadia, rest of gamepads coming soon

Fixes issue #83
ricardoquesada added a commit that referenced this issue Mar 18, 2024
ricardoquesada added a commit that referenced this issue Mar 18, 2024
ricardoquesada added a commit that referenced this issue Mar 19, 2024
Even though it was just one "magnitude" good to have one API for all
controllers.

#83
ricardoquesada added a commit that referenced this issue Mar 19, 2024
ricardoquesada added a commit that referenced this issue Mar 19, 2024
and remove the old "set_rumble" from the code

#83
@ricardoquesada
Copy link
Owner Author

fixed.

ricardoquesada added a commit to ricardoquesada/esp-idf-arduino-bluepad32-template that referenced this issue Mar 19, 2024
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

No branches or pull requests

1 participant