nx.js
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

GamepadHapticActuator

Properties

PropertyModifierType
typereadonly"vibration"

Methods

playEffect()

playEffect(type, params?): Promise<GamepadHapticsResult>

MDN Reference

Parameters

ParameterType
type"dual-rumble"
params?GamepadEffectParameters

Returns

Promise<GamepadHapticsResult>

Implementation of

globalThis.GamepadHapticActuator.playEffect


pulse()

pulse(duration, delay?): void

Parameters

ParameterType
durationnumber
delay?number

Returns

void


reset()

reset(): Promise<GamepadHapticsResult>

Returns

Promise<GamepadHapticsResult>

Implementation of

globalThis.GamepadHapticActuator.reset

On this page