@@ -535,6 +535,13 @@ interface GainOptions extends AudioNodeOptions {
535
535
gain?: number;
536
536
}
537
537
538
+ interface GamepadEffectParameters {
539
+ duration?: number;
540
+ startDelay?: number;
541
+ strongMagnitude?: number;
542
+ weakMagnitude?: number;
543
+ }
544
+
538
545
interface GamepadEventInit extends EventInit {
539
546
gamepad: Gamepad;
540
547
}
@@ -5947,6 +5954,7 @@ interface Gamepad {
5947
5954
readonly index: number;
5948
5955
readonly mapping: GamepadMappingType;
5949
5956
readonly timestamp: DOMHighResTimeStamp;
5957
+ readonly vibrationActuator: GamepadHapticActuator | null;
5950
5958
}
5951
5959
5952
5960
declare var Gamepad: {
@@ -5985,6 +5993,8 @@ declare var GamepadEvent: {
5985
5993
/** This Gamepad API interface represents hardware in the controller designed to provide haptic feedback to the user (if available), most commonly vibration hardware. */
5986
5994
interface GamepadHapticActuator {
5987
5995
readonly type: GamepadHapticActuatorType;
5996
+ playEffect(type: GamepadHapticEffectType, params?: GamepadEffectParameters): Promise<GamepadHapticsResult>;
5997
+ reset(): Promise<GamepadHapticsResult>;
5988
5998
}
5989
5999
5990
6000
declare var GamepadHapticActuator: {
@@ -19090,6 +19100,8 @@ type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded";
19090
19100
type FontFaceSetLoadStatus = "loaded" | "loading";
19091
19101
type FullscreenNavigationUI = "auto" | "hide" | "show";
19092
19102
type GamepadHapticActuatorType = "vibration";
19103
+ type GamepadHapticEffectType = "dual-rumble";
19104
+ type GamepadHapticsResult = "complete" | "preempted";
19093
19105
type GamepadMappingType = "" | "standard" | "xr-standard";
19094
19106
type GlobalCompositeOperation = "color" | "color-burn" | "color-dodge" | "copy" | "darken" | "destination-atop" | "destination-in" | "destination-out" | "destination-over" | "difference" | "exclusion" | "hard-light" | "hue" | "lighten" | "lighter" | "luminosity" | "multiply" | "overlay" | "saturation" | "screen" | "soft-light" | "source-atop" | "source-in" | "source-out" | "source-over" | "xor";
19095
19107
type HdrMetadataType = "smpteSt2086" | "smpteSt2094-10" | "smpteSt2094-40";
0 commit comments