melonJS
    Preparing search index...

    Interface GamepadVibration

    Options for input.vibrateGamepad.

    interface GamepadVibration {
        duration?: number;
        leftTrigger?: number;
        rightTrigger?: number;
        startDelay?: number;
        strongMagnitude?: number;
        type?: GamepadHapticEffectType;
        weakMagnitude?: number;
    }
    Index
    duration?: number

    how long the effect runs, milliseconds

    leftTrigger?: number

    left trigger motor, 0 to 1. "trigger-rumble" only

    rightTrigger?: number

    right trigger motor, 0 to 1. "trigger-rumble" only

    startDelay?: number

    how long to wait before it starts, milliseconds

    strongMagnitude?: number

    the heavy, low-frequency motor, 0 to 1

    type?: GamepadHapticEffectType

    Which effect to play. "dual-rumble" is the one every haptic pad supports; "trigger-rumble" drives the motors inside the triggers and is not widely implemented.

    weakMagnitude?: number

    the light, high-frequency motor, 0 to 1