GamepadHapticActuator
The GamepadHapticActuator interface of the Gamepad API represents hardware in the controller designed to provide haptic feedback to the user (if available), most commonly vibration hardware.
Methods
playEffect()
playEffect(type, params?): Promise<GamepadHapticsResult>;
The playEffect() method of the GamepadHapticActuator interface causes the hardware to play a specific vibration effect.
Parameters
| Parameter | Type |
|---|---|
type | GamepadHapticEffectType |
params? | GamepadEffectParameters |
Returns
Promise<GamepadHapticsResult>
reset()
reset(): Promise<GamepadHapticsResult>;
The reset() method of the GamepadHapticActuator interface stops the hardware from playing an active vibration effect.
Returns
Promise<GamepadHapticsResult>