Classes
GamepadHapticActuator
Represents hardware in the controller designed to provide haptic feedback to the user (if available), most commonly vibration hardware.
See
https://developer.mozilla.org/docs/Web/API/GamepadHapticActuator
Implements
Constructors
new GamepadHapticActuator()
new GamepadHapticActuator(): GamepadHapticActuator
Returns
Properties
Property | Modifier | Type |
---|---|---|
type | readonly | "vibration" |
Methods
playEffect()
playEffect(type
, params
?): Promise
<GamepadHapticsResult
>
Parameters
Parameter | Type |
---|---|
type | "dual-rumble" |
params ? | GamepadEffectParameters |
Returns
Promise
<GamepadHapticsResult
>
Implementation of
globalThis.GamepadHapticActuator.playEffect
pulse()
pulse(duration
, delay
?): void
Parameters
Parameter | Type |
---|---|
duration | number |
delay ? | number |
Returns
void
reset()
reset(): Promise
<GamepadHapticsResult
>
Returns
Promise
<GamepadHapticsResult
>
Implementation of
globalThis.GamepadHapticActuator.reset