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.
Functions
Link copied to clipboard
suspend fun playEffect(type: GamepadHapticEffectType, params: GamepadEffectParameters = definedExternally): GamepadHapticsResult
The playEffect()
method of the GamepadHapticActuator interface causes the hardware to play a specific vibration effect.
Link copied to clipboard
fun playEffectAsync(type: GamepadHapticEffectType, params: GamepadEffectParameters = definedExternally): Promise<GamepadHapticsResult>
Link copied to clipboard
The reset()
method of the GamepadHapticActuator interface stops the hardware from playing an active vibration effect.
Link copied to clipboard