From 62e3ad6d5d31413df5d14170f21804ee1ccec77d Mon Sep 17 00:00:00 2001 From: Gabriel Brito <80070607+gabrielsanbrito@users.noreply.github.com> Date: Fri, 29 Mar 2024 16:51:02 -0700 Subject: [PATCH 1/5] Add trigger rumble effect (#195) --- index.html | 76 +++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 70 insertions(+), 6 deletions(-) diff --git a/index.html b/index.html index 4d4318a..f61a277 100644 --- a/index.html +++ b/index.html @@ -1292,6 +1292,13 @@
enum GamepadHapticEffectType { - "dual-rumble" + "dual-rumble", + "trigger-rumble" };
Given {{GamepadEffectParameters}} |params:GamepadEffectParameters|, - a valid dual-rumble effect must have a valid - duration, a valid startDelay, and both the + a valid dual-rumble effect must have a [=valid effect|valid=] + {{GamepadEffectParameters/duration}}, a [=valid effect|valid=] {{GamepadEffectParameters/startDelay}}, and both the {{GamepadEffectParameters/strongMagnitude}} and the {{GamepadEffectParameters/weakMagnitude}} must be in the range `[0,1]`.
++ {{GamepadHapticEffectType/"trigger-rumble"}} describes a haptics + configuration with a vibration motor in each of the bottom front buttons + of a [=Standard Gamepad=] (buttons with [=canonical indices=] 6 and 7) in addition to the two handle motors used for + {{GamepadHapticEffectType/"dual-rumble"}}. These buttons + most commonly take the form of spring-loaded triggers. In this + configuration, either motor is capable of providing localized haptic + feedback on the button's surface. +
++ A {{GamepadHapticEffectType/"trigger-rumble"}} effect is a + fixed-duration, constant-intensity vibration effect intended for an + actuator of this type. {{GamepadHapticEffectType/"trigger-rumble"}} + effects are defined by {{GamepadEffectParameters/startDelay}}, + {{GamepadEffectParameters/duration}}, + {{GamepadEffectParameters/strongMagnitude}}, + {{GamepadEffectParameters/weakMagnitude}}, {{GamepadEffectParameters/leftTrigger}}, and {{GamepadEffectParameters/rightTrigger}}, none of which are + required because they default to 0. +
++ {{GamepadEffectParameters/startDelay}}, {{GamepadEffectParameters/duration}}, + {{GamepadEffectParameters/strongMagnitude}}, + {{GamepadEffectParameters/weakMagnitude}} share the same definition with {{GamepadHapticEffectType/"dual-rumble"}}. + {{GamepadEffectParameters/leftTrigger}} and + {{GamepadEffectParameters/rightTrigger}}, respectively, set the + intensity levels for the left and right bottom front buttons + vibrations, normalized to the range `[0,1]`, defaulting to 0. +
++ Given {{GamepadEffectParameters}} |params:GamepadEffectParameters|, + a valid trigger-rumble effect must have a [=valid effect|valid=] + {{GamepadEffectParameters/duration}}, a [=valid effect|valid=] {{GamepadEffectParameters/startDelay}}, and the + {{GamepadEffectParameters/strongMagnitude}}, + {{GamepadEffectParameters/weakMagnitude}}, {{GamepadEffectParameters/leftTrigger}}, and {{GamepadEffectParameters/rightTrigger}} must be in the range + `[0,1]`. +
+If an axis or button input represents a [=Standard Gamepad=] axis or - button, then its canonical index is the index of the + button, then its canonical index is the index of the corresponding [=Standard Gamepad=] axis or button.