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 rumble support. #16

Open
MaulingMonkey opened this issue Jul 27, 2019 · 0 comments
Open

Add rumble support. #16

MaulingMonkey opened this issue Jul 27, 2019 · 0 comments
Labels
api Change will alter API enhancement

Comments

@MaulingMonkey
Copy link
Owner

MaulingMonkey commented Jul 27, 2019

Works in Chrome

navigator.getGamepads()[0].vibrationActuator.type == "dual-rumble"
navigator.getGamepads()[1].vibrationActuator.playEffect("dual-rumble", {
    duration: 1000, // ms
    startDelay: 0, // ms
    weakMagnitude:   1, // 0..1 (~left)
    strongMagnitude: 1, // 0..1 (~right)
});
@MaulingMonkey MaulingMonkey self-assigned this Jul 27, 2019
@MaulingMonkey MaulingMonkey added enhancement api Change will alter API labels Jul 27, 2019
@MaulingMonkey MaulingMonkey removed their assignment Dec 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Change will alter API enhancement
Projects
None yet
Development

No branches or pull requests

1 participant