Skip to content

Commit df28ff2

Browse files
committed
Add Gamepad additions
1 parent 568b251 commit df28ff2

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

baselines/dom.generated.d.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,13 @@ interface GainOptions extends AudioNodeOptions {
535535
gain?: number;
536536
}
537537

538+
interface GamepadEffectParameters {
539+
duration?: number;
540+
startDelay?: number;
541+
strongMagnitude?: number;
542+
weakMagnitude?: number;
543+
}
544+
538545
interface GamepadEventInit extends EventInit {
539546
gamepad: Gamepad;
540547
}
@@ -5947,6 +5954,7 @@ interface Gamepad {
59475954
readonly index: number;
59485955
readonly mapping: GamepadMappingType;
59495956
readonly timestamp: DOMHighResTimeStamp;
5957+
readonly vibrationActuator: GamepadHapticActuator | null;
59505958
}
59515959

59525960
declare var Gamepad: {
@@ -5985,6 +5993,8 @@ declare var GamepadEvent: {
59855993
/** This Gamepad API interface represents hardware in the controller designed to provide haptic feedback to the user (if available), most commonly vibration hardware. */
59865994
interface GamepadHapticActuator {
59875995
readonly type: GamepadHapticActuatorType;
5996+
playEffect(type: GamepadHapticEffectType, params?: GamepadEffectParameters): Promise<GamepadHapticsResult>;
5997+
reset(): Promise<GamepadHapticsResult>;
59885998
}
59895999

59906000
declare var GamepadHapticActuator: {
@@ -19090,6 +19100,8 @@ type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded";
1909019100
type FontFaceSetLoadStatus = "loaded" | "loading";
1909119101
type FullscreenNavigationUI = "auto" | "hide" | "show";
1909219102
type GamepadHapticActuatorType = "vibration";
19103+
type GamepadHapticEffectType = "dual-rumble";
19104+
type GamepadHapticsResult = "complete" | "preempted";
1909319105
type GamepadMappingType = "" | "standard" | "xr-standard";
1909419106
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";
1909519107
type HdrMetadataType = "smpteSt2086" | "smpteSt2094-10" | "smpteSt2094-40";

0 commit comments

Comments
 (0)