Ver código fonte

Merge branch 'master' of https://github.com/BabylonJS/Babylon.js

David Catuhe 5 anos atrás
pai
commit
dbba26fc83

+ 1 - 1
dist/preview release/what's new.md

@@ -182,7 +182,7 @@
 - New Features Manager for WebXR features ([RaananW](https://github.com/RaananW/))
 - New features - Plane detection, Hit Test, Background remover ([RaananW](https://github.com/RaananW/))
 - Camera's API is Babylon-conform (position, rotationQuaternion, world matrix, direction etc') ([#7239](https://github.com/BabylonJS/Babylon.js/issues/7239)) ([RaananW](https://github.com/RaananW/))
-- XR Input now using standard profiles and completely separated from the gamepad class ([#7348](https://github.com/BabylonJS/Babylon.js/issues/7348)) ([RaananW](https://github.com/RaananW/))
+- XR Input now using standard profiles and completely separated from the babylon gamepad class ([#7348](https://github.com/BabylonJS/Babylon.js/issues/7348)) ([RaananW](https://github.com/RaananW/))
 - It is now possible to force a certain profile type for the controllers ([#7348](https://github.com/BabylonJS/Babylon.js/issues/7375)) ([RaananW](https://github.com/RaananW/))
 
 ### Ray

+ 3 - 10
src/Cameras/XR/motionController/webXRMicrosoftMixedRealityController.ts

@@ -20,8 +20,7 @@ const MixedRealityProfile: IMotionControllerLayoutMap = {
             "xr-standard-trigger": { "type": "trigger" },
             "xr-standard-squeeze": { "type": "squeeze" },
             "xr-standard-touchpad": { "type": "touchpad" },
-            "xr-standard-thumbstick": { "type": "thumbstick" },
-            "menu": { "type": "button" }
+            "xr-standard-thumbstick": { "type": "thumbstick" }
         },
         "gamepad": {
             "mapping": "xr-standard",
@@ -29,8 +28,7 @@ const MixedRealityProfile: IMotionControllerLayoutMap = {
                 "xr-standard-trigger",
                 "xr-standard-squeeze",
                 "xr-standard-touchpad",
-                "xr-standard-thumbstick",
-                "menu"
+                "xr-standard-thumbstick"
             ],
             "axes": [
                 { "componentId": "xr-standard-touchpad", "axis": "x-axis" },
@@ -93,11 +91,6 @@ export class WebXRMicrosoftMixedRealityController extends WebXRAbstractMotionCon
                 "rootNodeName": "THUMBSTICK_PRESS",
                 "componentProperty": "state",
                 "states": ["pressed"],
-            },
-            "menu": {
-                "rootNodeName": "MENU",
-                "componentProperty": "state",
-                "states": ["pressed"]
             }
         },
         axes: {
@@ -259,6 +252,6 @@ export class WebXRMicrosoftMixedRealityController extends WebXRAbstractMotionCon
 }
 
 // register the profile
-WebXRMotionControllerManager.RegisterController("microsoft-mixed-reality", (xrInput: XRInputSource, scene: Scene) => {
+WebXRMotionControllerManager.RegisterController("windows-mixed-reality", (xrInput: XRInputSource, scene: Scene) => {
     return new WebXRMicrosoftMixedRealityController(scene, <any>(xrInput.gamepad), xrInput.handedness);
 });

+ 3 - 2
src/Cameras/XR/motionController/webXRMotionControllerManager.ts

@@ -121,11 +121,12 @@ export class WebXRMotionControllerManager {
         this.RegisterFallbacksForProfileId("htc-vive-focus", ["generic-trigger-touchpad"]);
         this.RegisterFallbacksForProfileId("htc-vive", ["generic-trigger-squeeze-touchpad"]);
         this.RegisterFallbacksForProfileId("magicleap-one", ["generic-trigger-squeeze-touchpad"]);
-        this.RegisterFallbacksForProfileId("microsoft-mixed-reality", ["generic-trigger-squeeze-touchpad-thumbstick"]);
+        this.RegisterFallbacksForProfileId("windows-mixed-reality", ["generic-trigger-squeeze-touchpad-thumbstick"]);
+        this.RegisterFallbacksForProfileId("microsoft-mixed-reality", ["windows-mixed-reality", "generic-trigger-squeeze-touchpad-thumbstick"]);
         this.RegisterFallbacksForProfileId("oculus-go", ["generic-trigger-touchpad"]);
         this.RegisterFallbacksForProfileId("oculus-touch-v2", ["oculus-touch", "generic-trigger-squeeze-thumbstick"]);
         this.RegisterFallbacksForProfileId("oculus-touch", ["generic-trigger-squeeze-thumbstick"]);
-        this.RegisterFallbacksForProfileId("samsung-gearvr", ["microsoft-mixed-reality", "generic-trigger-squeeze-touchpad-thumbstick"]);
+        this.RegisterFallbacksForProfileId("samsung-gearvr", ["windows-mixed-reality", "generic-trigger-squeeze-touchpad-thumbstick"]);
         this.RegisterFallbacksForProfileId("samsung-odyssey", ["generic-touchpad"]);
         this.RegisterFallbacksForProfileId("valve-index", ["generic-trigger-squeeze-touchpad-thumbstick"]);
     }