Gamepad index
how hard and how long; see GamepadVibration
whether the effect ran to completion. false covers unsupported,
preempted by a later call, and rejected by the device alike — a rumble is
feedback, and nothing sensible branches on which of those happened.
Vibrate a gamepad.
Safe to call blind: with no pad in that slot, no motors, or a browser without the Gamepad API at all, it resolves
falseand does nothing. That is the whole error path, so game code never has to branch on support.Magnitudes default to FULL, unlike the underlying web API where every parameter defaults to zero and a bare
playEffect("dual-rumble")is a silent no-op.vibrateGamepad(0)vibrates.A second call preempts the first on the same pad, which is what makes a rapid series of hits read as a rapid series of hits rather than a queue. That is for DISTINCT events: a sustained rumble should be one effect with a long
duration, not a call per frame, which would spend a promise and a preempted effect every frame to produce one continuous one.