{"ast":null,"code":"import { WebXRAbstractMotionController } from \"./webXRAbstractMotionController.js\";\nimport { WebXRMotionControllerManager } from \"./webXRMotionControllerManager.js\";\nimport { Mesh } from \"../../Meshes/mesh.js\";\nimport { Quaternion } from \"../../Maths/math.vector.js\";\nimport { SceneLoader } from \"../../Loading/sceneLoader.js\";\nimport { Logger } from \"../../Misc/logger.js\";\n/**\n * The motion controller class for all microsoft mixed reality controllers\n */\nexport class WebXRMicrosoftMixedRealityController extends WebXRAbstractMotionController {\n constructor(scene, gamepadObject, handedness) {\n super(scene, MixedRealityProfile[\"left-right\"], gamepadObject, handedness);\n // use this in the future - https://github.com/immersive-web/webxr-input-profiles/tree/master/packages/assets/profiles/microsoft\n this._mapping = {\n defaultButton: {\n valueNodeName: \"VALUE\",\n unpressedNodeName: \"UNPRESSED\",\n pressedNodeName: \"PRESSED\"\n },\n defaultAxis: {\n valueNodeName: \"VALUE\",\n minNodeName: \"MIN\",\n maxNodeName: \"MAX\"\n },\n buttons: {\n \"xr-standard-trigger\": {\n rootNodeName: \"SELECT\",\n componentProperty: \"button\",\n states: [\"default\", \"touched\", \"pressed\"]\n },\n \"xr-standard-squeeze\": {\n rootNodeName: \"GRASP\",\n componentProperty: \"state\",\n states: [\"pressed\"]\n },\n \"xr-standard-touchpad\": {\n rootNodeName: \"TOUCHPAD_PRESS\",\n labelAnchorNodeName: \"squeeze-label\",\n touchPointNodeName: \"TOUCH\" // TODO - use this for visual feedback\n },\n \"xr-standard-thumbstick\": {\n rootNodeName: \"THUMBSTICK_PRESS\",\n componentProperty: \"state\",\n states: [\"pressed\"]\n }\n },\n axes: {\n \"xr-standard-touchpad\": {\n \"x-axis\": {\n rootNodeName: \"TOUCHPAD_TOUCH_X\"\n },\n \"y-axis\": {\n rootNodeName: \"TOUCHPAD_TOUCH_Y\"\n }\n },\n \"xr-standard-thumbstick\": {\n \"x-axis\": {\n rootNodeName: \"THUMBSTICK_X\"\n },\n \"y-axis\": {\n rootNodeName: \"THUMBSTICK_Y\"\n }\n }\n }\n };\n this.profileId = \"microsoft-mixed-reality\";\n }\n _getFilenameAndPath() {\n let filename = \"\";\n if (this.handedness === \"left\") {\n filename = WebXRMicrosoftMixedRealityController.MODEL_LEFT_FILENAME;\n } else {\n // Right is the default if no hand is specified\n filename = WebXRMicrosoftMixedRealityController.MODEL_RIGHT_FILENAME;\n }\n const device = \"default\";\n const path = WebXRMicrosoftMixedRealityController.MODEL_BASE_URL + device + \"/\";\n return {\n filename,\n path\n };\n }\n _getModelLoadingConstraints() {\n const glbLoaded = SceneLoader.IsPluginForExtensionAvailable(\".glb\");\n if (!glbLoaded) {\n Logger.Warn(\"glTF / glb loaded was not registered, using generic controller instead\");\n }\n return glbLoaded;\n }\n _processLoadedModel(_meshes) {\n if (!this.rootMesh) {\n return;\n }\n // Button Meshes\n this.getComponentIds().forEach((id, i) => {\n if (this.disableAnimation) {\n return;\n }\n if (id && this.rootMesh) {\n const buttonMap = this._mapping.buttons[id];\n const buttonMeshName = buttonMap.rootNodeName;\n if (!buttonMeshName) {\n Logger.Log(\"Skipping unknown button at index: \" + i + \" with mapped name: \" + id);\n return;\n }\n const buttonMesh = this._getChildByName(this.rootMesh, buttonMeshName);\n if (!buttonMesh) {\n Logger.Warn(\"Missing button mesh with name: \" + buttonMeshName);\n return;\n }\n buttonMap.valueMesh = this._getImmediateChildByName(buttonMesh, this._mapping.defaultButton.valueNodeName);\n buttonMap.pressedMesh = this._getImmediateChildByName(buttonMesh, this._mapping.defaultButton.pressedNodeName);\n buttonMap.unpressedMesh = this._getImmediateChildByName(buttonMesh, this._mapping.defaultButton.unpressedNodeName);\n if (buttonMap.valueMesh && buttonMap.pressedMesh && buttonMap.unpressedMesh) {\n const comp = this.getComponent(id);\n if (comp) {\n comp.onButtonStateChangedObservable.add(component => {\n this._lerpTransform(buttonMap, component.value);\n }, undefined, true);\n }\n } else {\n // If we didn't find the mesh, it simply means this button won't have transforms applied as mapped button value changes.\n Logger.Warn(\"Missing button submesh under mesh with name: \" + buttonMeshName);\n }\n }\n });\n // Axis Meshes\n this.getComponentIds().forEach(id => {\n const comp = this.getComponent(id);\n if (!comp.isAxes()) {\n return;\n }\n [\"x-axis\", \"y-axis\"].forEach(axis => {\n if (!this.rootMesh) {\n return;\n }\n const axisMap = this._mapping.axes[id][axis];\n const axisMesh = this._getChildByName(this.rootMesh, axisMap.rootNodeName);\n if (!axisMesh) {\n Logger.Warn(\"Missing axis mesh with name: \" + axisMap.rootNodeName);\n return;\n }\n axisMap.valueMesh = this._getImmediateChildByName(axisMesh, this._mapping.defaultAxis.valueNodeName);\n axisMap.minMesh = this._getImmediateChildByName(axisMesh, this._mapping.defaultAxis.minNodeName);\n axisMap.maxMesh = this._getImmediateChildByName(axisMesh, this._mapping.defaultAxis.maxNodeName);\n if (axisMap.valueMesh && axisMap.minMesh && axisMap.maxMesh) {\n if (comp) {\n comp.onAxisValueChangedObservable.add(axisValues => {\n const value = axis === \"x-axis\" ? axisValues.x : axisValues.y;\n this._lerpTransform(axisMap, value, true);\n }, undefined, true);\n }\n } else {\n // If we didn't find the mesh, it simply means this button won't have transforms applied as mapped button value changes.\n Logger.Warn(\"Missing axis submesh under mesh with name: \" + axisMap.rootNodeName);\n }\n });\n });\n }\n _setRootMesh(meshes) {\n this.rootMesh = new Mesh(this.profileId + \" \" + this.handedness, this.scene);\n this.rootMesh.isPickable = false;\n let rootMesh;\n // Find the root node in the loaded glTF scene, and attach it as a child of 'parentMesh'\n for (let i = 0; i < meshes.length; i++) {\n const mesh = meshes[i];\n mesh.isPickable = false;\n if (!mesh.parent) {\n // Handle root node, attach to the new parentMesh\n rootMesh = mesh;\n }\n }\n if (rootMesh) {\n rootMesh.setParent(this.rootMesh);\n }\n if (!this.scene.useRightHandedSystem) {\n this.rootMesh.rotationQuaternion = Quaternion.FromEulerAngles(0, Math.PI, 0);\n }\n }\n _updateModel() {\n // no-op. model is updated using observables.\n }\n}\n/**\n * The base url used to load the left and right controller models\n */\nWebXRMicrosoftMixedRealityController.MODEL_BASE_URL = \"https://controllers.babylonjs.com/microsoft/\";\n/**\n * The name of the left controller model file\n */\nWebXRMicrosoftMixedRealityController.MODEL_LEFT_FILENAME = \"left.glb\";\n/**\n * The name of the right controller model file\n */\nWebXRMicrosoftMixedRealityController.MODEL_RIGHT_FILENAME = \"right.glb\";\n// register the profile\nWebXRMotionControllerManager.RegisterController(\"windows-mixed-reality\", (xrInput, scene) => {\n return new WebXRMicrosoftMixedRealityController(scene, xrInput.gamepad, xrInput.handedness);\n});\n// https://github.com/immersive-web/webxr-input-profiles/blob/master/packages/registry/profiles/microsoft/microsoft-mixed-reality.json\nconst MixedRealityProfile = {\n left: {\n selectComponentId: \"xr-standard-trigger\",\n components: {\n \"xr-standard-trigger\": {\n type: \"trigger\",\n gamepadIndices: {\n button: 0\n },\n rootNodeName: \"xr_standard_trigger\",\n visualResponses: {\n xr_standard_trigger_pressed: {\n componentProperty: \"button\",\n states: [\"default\", \"touched\", \"pressed\"],\n valueNodeProperty: \"transform\",\n valueNodeName: \"xr_standard_trigger_pressed_value\",\n minNodeName: \"xr_standard_trigger_pressed_min\",\n maxNodeName: \"xr_standard_trigger_pressed_max\"\n }\n }\n },\n \"xr-standard-squeeze\": {\n type: \"squeeze\",\n gamepadIndices: {\n button: 1\n },\n rootNodeName: \"xr_standard_squeeze\",\n visualResponses: {\n xr_standard_squeeze_pressed: {\n componentProperty: \"button\",\n states: [\"default\", \"touched\", \"pressed\"],\n valueNodeProperty: \"transform\",\n valueNodeName: \"xr_standard_squeeze_pressed_value\",\n minNodeName: \"xr_standard_squeeze_pressed_min\",\n maxNodeName: \"xr_standard_squeeze_pressed_max\"\n }\n }\n },\n \"xr-standard-touchpad\": {\n type: \"touchpad\",\n gamepadIndices: {\n button: 2,\n xAxis: 0,\n yAxis: 1\n },\n rootNodeName: \"xr_standard_touchpad\",\n visualResponses: {\n xr_standard_touchpad_pressed: {\n componentProperty: \"button\",\n states: [\"default\", \"touched\", \"pressed\"],\n valueNodeProperty: \"transform\",\n valueNodeName: \"xr_standard_touchpad_pressed_value\",\n minNodeName: \"xr_standard_touchpad_pressed_min\",\n maxNodeName: \"xr_standard_touchpad_pressed_max\"\n },\n xr_standard_touchpad_xaxis_pressed: {\n componentProperty: \"xAxis\",\n states: [\"default\", \"touched\", \"pressed\"],\n valueNodeProperty: \"transform\",\n valueNodeName: \"xr_standard_touchpad_xaxis_pressed_value\",\n minNodeName: \"xr_standard_touchpad_xaxis_pressed_min\",\n maxNodeName: \"xr_standard_touchpad_xaxis_pressed_max\"\n },\n xr_standard_touchpad_yaxis_pressed: {\n componentProperty: \"yAxis\",\n states: [\"default\", \"touched\", \"pressed\"],\n valueNodeProperty: \"transform\",\n valueNodeName: \"xr_standard_touchpad_yaxis_pressed_value\",\n minNodeName: \"xr_standard_touchpad_yaxis_pressed_min\",\n maxNodeName: \"xr_standard_touchpad_yaxis_pressed_max\"\n },\n xr_standard_touchpad_xaxis_touched: {\n componentProperty: \"xAxis\",\n states: [\"default\", \"touched\", \"pressed\"],\n valueNodeProperty: \"transform\",\n valueNodeName: \"xr_standard_touchpad_xaxis_touched_value\",\n minNodeName: \"xr_standard_touchpad_xaxis_touched_min\",\n maxNodeName: \"xr_standard_touchpad_xaxis_touched_max\"\n },\n xr_standard_touchpad_yaxis_touched: {\n componentProperty: \"yAxis\",\n states: [\"default\", \"touched\", \"pressed\"],\n valueNodeProperty: \"transform\",\n valueNodeName: \"xr_standard_touchpad_yaxis_touched_value\",\n minNodeName: \"xr_standard_touchpad_yaxis_touched_min\",\n maxNodeName: \"xr_standard_touchpad_yaxis_touched_max\"\n },\n xr_standard_touchpad_axes_touched: {\n componentProperty: \"state\",\n states: [\"touched\", \"pressed\"],\n valueNodeProperty: \"visibility\",\n valueNodeName: \"xr_standard_touchpad_axes_touched_value\"\n }\n },\n touchPointNodeName: \"xr_standard_touchpad_axes_touched_value\"\n },\n \"xr-standard-thumbstick\": {\n type: \"thumbstick\",\n gamepadIndices: {\n button: 3,\n xAxis: 2,\n yAxis: 3\n },\n rootNodeName: \"xr_standard_thumbstick\",\n visualResponses: {\n xr_standard_thumbstick_pressed: {\n componentProperty: \"button\",\n states: [\"default\", \"touched\", \"pressed\"],\n valueNodeProperty: \"transform\",\n valueNodeName: \"xr_standard_thumbstick_pressed_value\",\n minNodeName: \"xr_standard_thumbstick_pressed_min\",\n maxNodeName: \"xr_standard_thumbstick_pressed_max\"\n },\n xr_standard_thumbstick_xaxis_pressed: {\n componentProperty: \"xAxis\",\n states: [\"default\", \"touched\", \"pressed\"],\n valueNodeProperty: \"transform\",\n valueNodeName: \"xr_standard_thumbstick_xaxis_pressed_value\",\n minNodeName: \"xr_standard_thumbstick_xaxis_pressed_min\",\n maxNodeName: \"xr_standard_thumbstick_xaxis_pressed_max\"\n },\n xr_standard_thumbstick_yaxis_pressed: {\n componentProperty: \"yAxis\",\n states: [\"default\", \"touched\", \"pressed\"],\n valueNodeProperty: \"transform\",\n valueNodeName: \"xr_standard_thumbstick_yaxis_pressed_value\",\n minNodeName: \"xr_standard_thumbstick_yaxis_pressed_min\",\n maxNodeName: \"xr_standard_thumbstick_yaxis_pressed_max\"\n }\n }\n }\n },\n gamepadMapping: \"xr-standard\",\n rootNodeName: \"microsoft-mixed-reality-left\",\n assetPath: \"left.glb\"\n },\n right: {\n selectComponentId: \"xr-standard-trigger\",\n components: {\n \"xr-standard-trigger\": {\n type: \"trigger\",\n gamepadIndices: {\n button: 0\n },\n rootNodeName: \"xr_standard_trigger\",\n visualResponses: {\n xr_standard_trigger_pressed: {\n componentProperty: \"button\",\n states: [\"default\", \"touched\", \"pressed\"],\n valueNodeProperty: \"transform\",\n valueNodeName: \"xr_standard_trigger_pressed_value\",\n minNodeName: \"xr_standard_trigger_pressed_min\",\n maxNodeName: \"xr_standard_trigger_pressed_max\"\n }\n }\n },\n \"xr-standard-squeeze\": {\n type: \"squeeze\",\n gamepadIndices: {\n button: 1\n },\n rootNodeName: \"xr_standard_squeeze\",\n visualResponses: {\n xr_standard_squeeze_pressed: {\n componentProperty: \"button\",\n states: [\"default\", \"touched\", \"pressed\"],\n valueNodeProperty: \"transform\",\n valueNodeName: \"xr_standard_squeeze_pressed_value\",\n minNodeName: \"xr_standard_squeeze_pressed_min\",\n maxNodeName: \"xr_standard_squeeze_pressed_max\"\n }\n }\n },\n \"xr-standard-touchpad\": {\n type: \"touchpad\",\n gamepadIndices: {\n button: 2,\n xAxis: 0,\n yAxis: 1\n },\n rootNodeName: \"xr_standard_touchpad\",\n visualResponses: {\n xr_standard_touchpad_pressed: {\n componentProperty: \"button\",\n states: [\"default\", \"touched\", \"pressed\"],\n valueNodeProperty: \"transform\",\n valueNodeName: \"xr_standard_touchpad_pressed_value\",\n minNodeName: \"xr_standard_touchpad_pressed_min\",\n maxNodeName: \"xr_standard_touchpad_pressed_max\"\n },\n xr_standard_touchpad_xaxis_pressed: {\n componentProperty: \"xAxis\",\n states: [\"default\", \"touched\", \"pressed\"],\n valueNodeProperty: \"transform\",\n valueNodeName: \"xr_standard_touchpad_xaxis_pressed_value\",\n minNodeName: \"xr_standard_touchpad_xaxis_pressed_min\",\n maxNodeName: \"xr_standard_touchpad_xaxis_pressed_max\"\n },\n xr_standard_touchpad_yaxis_pressed: {\n componentProperty: \"yAxis\",\n states: [\"default\", \"touched\", \"pressed\"],\n valueNodeProperty: \"transform\",\n valueNodeName: \"xr_standard_touchpad_yaxis_pressed_value\",\n minNodeName: \"xr_standard_touchpad_yaxis_pressed_min\",\n maxNodeName: \"xr_standard_touchpad_yaxis_pressed_max\"\n },\n xr_standard_touchpad_xaxis_touched: {\n componentProperty: \"xAxis\",\n states: [\"default\", \"touched\", \"pressed\"],\n valueNodeProperty: \"transform\",\n valueNodeName: \"xr_standard_touchpad_xaxis_touched_value\",\n minNodeName: \"xr_standard_touchpad_xaxis_touched_min\",\n maxNodeName: \"xr_standard_touchpad_xaxis_touched_max\"\n },\n xr_standard_touchpad_yaxis_touched: {\n componentProperty: \"yAxis\",\n states: [\"default\", \"touched\", \"pressed\"],\n valueNodeProperty: \"transform\",\n valueNodeName: \"xr_standard_touchpad_yaxis_touched_value\",\n minNodeName: \"xr_standard_touchpad_yaxis_touched_min\",\n maxNodeName: \"xr_standard_touchpad_yaxis_touched_max\"\n },\n xr_standard_touchpad_axes_touched: {\n componentProperty: \"state\",\n states: [\"touched\", \"pressed\"],\n valueNodeProperty: \"visibility\",\n valueNodeName: \"xr_standard_touchpad_axes_touched_value\"\n }\n },\n touchPointNodeName: \"xr_standard_touchpad_axes_touched_value\"\n },\n \"xr-standard-thumbstick\": {\n type: \"thumbstick\",\n gamepadIndices: {\n button: 3,\n xAxis: 2,\n yAxis: 3\n },\n rootNodeName: \"xr_standard_thumbstick\",\n visualResponses: {\n xr_standard_thumbstick_pressed: {\n componentProperty: \"button\",\n states: [\"default\", \"touched\", \"pressed\"],\n valueNodeProperty: \"transform\",\n valueNodeName: \"xr_standard_thumbstick_pressed_value\",\n minNodeName: \"xr_standard_thumbstick_pressed_min\",\n maxNodeName: \"xr_standard_thumbstick_pressed_max\"\n },\n xr_standard_thumbstick_xaxis_pressed: {\n componentProperty: \"xAxis\",\n states: [\"default\", \"touched\", \"pressed\"],\n valueNodeProperty: \"transform\",\n valueNodeName: \"xr_standard_thumbstick_xaxis_pressed_value\",\n minNodeName: \"xr_standard_thumbstick_xaxis_pressed_min\",\n maxNodeName: \"xr_standard_thumbstick_xaxis_pressed_max\"\n },\n xr_standard_thumbstick_yaxis_pressed: {\n componentProperty: \"yAxis\",\n states: [\"default\", \"touched\", \"pressed\"],\n valueNodeProperty: \"transform\",\n valueNodeName: \"xr_standard_thumbstick_yaxis_pressed_value\",\n minNodeName: \"xr_standard_thumbstick_yaxis_pressed_min\",\n maxNodeName: \"xr_standard_thumbstick_yaxis_pressed_max\"\n }\n }\n }\n },\n gamepadMapping: \"xr-standard\",\n rootNodeName: \"microsoft-mixed-reality-right\",\n assetPath: \"right.glb\"\n }\n};","map":{"version":3,"names":["WebXRAbstractMotionController","WebXRMotionControllerManager","Mesh","Quaternion","SceneLoader","Logger","WebXRMicrosoftMixedRealityController","constructor","scene","gamepadObject","handedness","MixedRealityProfile","_mapping","defaultButton","valueNodeName","unpressedNodeName","pressedNodeName","defaultAxis","minNodeName","maxNodeName","buttons","rootNodeName","componentProperty","states","labelAnchorNodeName","touchPointNodeName","axes","profileId","_getFilenameAndPath","filename","MODEL_LEFT_FILENAME","MODEL_RIGHT_FILENAME","device","path","MODEL_BASE_URL","_getModelLoadingConstraints","glbLoaded","IsPluginForExtensionAvailable","Warn","_processLoadedModel","_meshes","rootMesh","getComponentIds","forEach","id","i","disableAnimation","buttonMap","buttonMeshName","Log","buttonMesh","_getChildByName","valueMesh","_getImmediateChildByName","pressedMesh","unpressedMesh","comp","getComponent","onButtonStateChangedObservable","add","component","_lerpTransform","value","undefined","isAxes","axis","axisMap","axisMesh","minMesh","maxMesh","onAxisValueChangedObservable","axisValues","x","y","_setRootMesh","meshes","isPickable","length","mesh","parent","setParent","useRightHandedSystem","rotationQuaternion","FromEulerAngles","Math","PI","_updateModel","RegisterController","xrInput","gamepad","left","selectComponentId","components","type","gamepadIndices","button","visualResponses","xr_standard_trigger_pressed","valueNodeProperty","xr_standard_squeeze_pressed","xAxis","yAxis","xr_standard_touchpad_pressed","xr_standard_touchpad_xaxis_pressed","xr_standard_touchpad_yaxis_pressed","xr_standard_touchpad_xaxis_touched","xr_standard_touchpad_yaxis_touched","xr_standard_touchpad_axes_touched","xr_standard_thumbstick_pressed","xr_standard_thumbstick_xaxis_pressed","xr_standard_thumbstick_yaxis_pressed","gamepadMapping","assetPath","right"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/XR/motionController/webXRMicrosoftMixedRealityController.js"],"sourcesContent":["import { WebXRAbstractMotionController } from \"./webXRAbstractMotionController.js\";\nimport { WebXRMotionControllerManager } from \"./webXRMotionControllerManager.js\";\nimport { Mesh } from \"../../Meshes/mesh.js\";\nimport { Quaternion } from \"../../Maths/math.vector.js\";\nimport { SceneLoader } from \"../../Loading/sceneLoader.js\";\nimport { Logger } from \"../../Misc/logger.js\";\n/**\n * The motion controller class for all microsoft mixed reality controllers\n */\nexport class WebXRMicrosoftMixedRealityController extends WebXRAbstractMotionController {\n constructor(scene, gamepadObject, handedness) {\n super(scene, MixedRealityProfile[\"left-right\"], gamepadObject, handedness);\n // use this in the future - https://github.com/immersive-web/webxr-input-profiles/tree/master/packages/assets/profiles/microsoft\n this._mapping = {\n defaultButton: {\n valueNodeName: \"VALUE\",\n unpressedNodeName: \"UNPRESSED\",\n pressedNodeName: \"PRESSED\",\n },\n defaultAxis: {\n valueNodeName: \"VALUE\",\n minNodeName: \"MIN\",\n maxNodeName: \"MAX\",\n },\n buttons: {\n \"xr-standard-trigger\": {\n rootNodeName: \"SELECT\",\n componentProperty: \"button\",\n states: [\"default\", \"touched\", \"pressed\"],\n },\n \"xr-standard-squeeze\": {\n rootNodeName: \"GRASP\",\n componentProperty: \"state\",\n states: [\"pressed\"],\n },\n \"xr-standard-touchpad\": {\n rootNodeName: \"TOUCHPAD_PRESS\",\n labelAnchorNodeName: \"squeeze-label\",\n touchPointNodeName: \"TOUCH\", // TODO - use this for visual feedback\n },\n \"xr-standard-thumbstick\": {\n rootNodeName: \"THUMBSTICK_PRESS\",\n componentProperty: \"state\",\n states: [\"pressed\"],\n },\n },\n axes: {\n \"xr-standard-touchpad\": {\n \"x-axis\": {\n rootNodeName: \"TOUCHPAD_TOUCH_X\",\n },\n \"y-axis\": {\n rootNodeName: \"TOUCHPAD_TOUCH_Y\",\n },\n },\n \"xr-standard-thumbstick\": {\n \"x-axis\": {\n rootNodeName: \"THUMBSTICK_X\",\n },\n \"y-axis\": {\n rootNodeName: \"THUMBSTICK_Y\",\n },\n },\n },\n };\n this.profileId = \"microsoft-mixed-reality\";\n }\n _getFilenameAndPath() {\n let filename = \"\";\n if (this.handedness === \"left\") {\n filename = WebXRMicrosoftMixedRealityController.MODEL_LEFT_FILENAME;\n }\n else {\n // Right is the default if no hand is specified\n filename = WebXRMicrosoftMixedRealityController.MODEL_RIGHT_FILENAME;\n }\n const device = \"default\";\n const path = WebXRMicrosoftMixedRealityController.MODEL_BASE_URL + device + \"/\";\n return {\n filename,\n path,\n };\n }\n _getModelLoadingConstraints() {\n const glbLoaded = SceneLoader.IsPluginForExtensionAvailable(\".glb\");\n if (!glbLoaded) {\n Logger.Warn(\"glTF / glb loaded was not registered, using generic controller instead\");\n }\n return glbLoaded;\n }\n _processLoadedModel(_meshes) {\n if (!this.rootMesh) {\n return;\n }\n // Button Meshes\n this.getComponentIds().forEach((id, i) => {\n if (this.disableAnimation) {\n return;\n }\n if (id && this.rootMesh) {\n const buttonMap = this._mapping.buttons[id];\n const buttonMeshName = buttonMap.rootNodeName;\n if (!buttonMeshName) {\n Logger.Log(\"Skipping unknown button at index: \" + i + \" with mapped name: \" + id);\n return;\n }\n const buttonMesh = this._getChildByName(this.rootMesh, buttonMeshName);\n if (!buttonMesh) {\n Logger.Warn(\"Missing button mesh with name: \" + buttonMeshName);\n return;\n }\n buttonMap.valueMesh = this._getImmediateChildByName(buttonMesh, this._mapping.defaultButton.valueNodeName);\n buttonMap.pressedMesh = this._getImmediateChildByName(buttonMesh, this._mapping.defaultButton.pressedNodeName);\n buttonMap.unpressedMesh = this._getImmediateChildByName(buttonMesh, this._mapping.defaultButton.unpressedNodeName);\n if (buttonMap.valueMesh && buttonMap.pressedMesh && buttonMap.unpressedMesh) {\n const comp = this.getComponent(id);\n if (comp) {\n comp.onButtonStateChangedObservable.add((component) => {\n this._lerpTransform(buttonMap, component.value);\n }, undefined, true);\n }\n }\n else {\n // If we didn't find the mesh, it simply means this button won't have transforms applied as mapped button value changes.\n Logger.Warn(\"Missing button submesh under mesh with name: \" + buttonMeshName);\n }\n }\n });\n // Axis Meshes\n this.getComponentIds().forEach((id) => {\n const comp = this.getComponent(id);\n if (!comp.isAxes()) {\n return;\n }\n [\"x-axis\", \"y-axis\"].forEach((axis) => {\n if (!this.rootMesh) {\n return;\n }\n const axisMap = this._mapping.axes[id][axis];\n const axisMesh = this._getChildByName(this.rootMesh, axisMap.rootNodeName);\n if (!axisMesh) {\n Logger.Warn(\"Missing axis mesh with name: \" + axisMap.rootNodeName);\n return;\n }\n axisMap.valueMesh = this._getImmediateChildByName(axisMesh, this._mapping.defaultAxis.valueNodeName);\n axisMap.minMesh = this._getImmediateChildByName(axisMesh, this._mapping.defaultAxis.minNodeName);\n axisMap.maxMesh = this._getImmediateChildByName(axisMesh, this._mapping.defaultAxis.maxNodeName);\n if (axisMap.valueMesh && axisMap.minMesh && axisMap.maxMesh) {\n if (comp) {\n comp.onAxisValueChangedObservable.add((axisValues) => {\n const value = axis === \"x-axis\" ? axisValues.x : axisValues.y;\n this._lerpTransform(axisMap, value, true);\n }, undefined, true);\n }\n }\n else {\n // If we didn't find the mesh, it simply means this button won't have transforms applied as mapped button value changes.\n Logger.Warn(\"Missing axis submesh under mesh with name: \" + axisMap.rootNodeName);\n }\n });\n });\n }\n _setRootMesh(meshes) {\n this.rootMesh = new Mesh(this.profileId + \" \" + this.handedness, this.scene);\n this.rootMesh.isPickable = false;\n let rootMesh;\n // Find the root node in the loaded glTF scene, and attach it as a child of 'parentMesh'\n for (let i = 0; i < meshes.length; i++) {\n const mesh = meshes[i];\n mesh.isPickable = false;\n if (!mesh.parent) {\n // Handle root node, attach to the new parentMesh\n rootMesh = mesh;\n }\n }\n if (rootMesh) {\n rootMesh.setParent(this.rootMesh);\n }\n if (!this.scene.useRightHandedSystem) {\n this.rootMesh.rotationQuaternion = Quaternion.FromEulerAngles(0, Math.PI, 0);\n }\n }\n _updateModel() {\n // no-op. model is updated using observables.\n }\n}\n/**\n * The base url used to load the left and right controller models\n */\nWebXRMicrosoftMixedRealityController.MODEL_BASE_URL = \"https://controllers.babylonjs.com/microsoft/\";\n/**\n * The name of the left controller model file\n */\nWebXRMicrosoftMixedRealityController.MODEL_LEFT_FILENAME = \"left.glb\";\n/**\n * The name of the right controller model file\n */\nWebXRMicrosoftMixedRealityController.MODEL_RIGHT_FILENAME = \"right.glb\";\n// register the profile\nWebXRMotionControllerManager.RegisterController(\"windows-mixed-reality\", (xrInput, scene) => {\n return new WebXRMicrosoftMixedRealityController(scene, xrInput.gamepad, xrInput.handedness);\n});\n// https://github.com/immersive-web/webxr-input-profiles/blob/master/packages/registry/profiles/microsoft/microsoft-mixed-reality.json\nconst MixedRealityProfile = {\n left: {\n selectComponentId: \"xr-standard-trigger\",\n components: {\n \"xr-standard-trigger\": {\n type: \"trigger\",\n gamepadIndices: {\n button: 0,\n },\n rootNodeName: \"xr_standard_trigger\",\n visualResponses: {\n xr_standard_trigger_pressed: {\n componentProperty: \"button\",\n states: [\"default\", \"touched\", \"pressed\"],\n valueNodeProperty: \"transform\",\n valueNodeName: \"xr_standard_trigger_pressed_value\",\n minNodeName: \"xr_standard_trigger_pressed_min\",\n maxNodeName: \"xr_standard_trigger_pressed_max\",\n },\n },\n },\n \"xr-standard-squeeze\": {\n type: \"squeeze\",\n gamepadIndices: {\n button: 1,\n },\n rootNodeName: \"xr_standard_squeeze\",\n visualResponses: {\n xr_standard_squeeze_pressed: {\n componentProperty: \"button\",\n states: [\"default\", \"touched\", \"pressed\"],\n valueNodeProperty: \"transform\",\n valueNodeName: \"xr_standard_squeeze_pressed_value\",\n minNodeName: \"xr_standard_squeeze_pressed_min\",\n maxNodeName: \"xr_standard_squeeze_pressed_max\",\n },\n },\n },\n \"xr-standard-touchpad\": {\n type: \"touchpad\",\n gamepadIndices: {\n button: 2,\n xAxis: 0,\n yAxis: 1,\n },\n rootNodeName: \"xr_standard_touchpad\",\n visualResponses: {\n xr_standard_touchpad_pressed: {\n componentProperty: \"button\",\n states: [\"default\", \"touched\", \"pressed\"],\n valueNodeProperty: \"transform\",\n valueNodeName: \"xr_standard_touchpad_pressed_value\",\n minNodeName: \"xr_standard_touchpad_pressed_min\",\n maxNodeName: \"xr_standard_touchpad_pressed_max\",\n },\n xr_standard_touchpad_xaxis_pressed: {\n componentProperty: \"xAxis\",\n states: [\"default\", \"touched\", \"pressed\"],\n valueNodeProperty: \"transform\",\n valueNodeName: \"xr_standard_touchpad_xaxis_pressed_value\",\n minNodeName: \"xr_standard_touchpad_xaxis_pressed_min\",\n maxNodeName: \"xr_standard_touchpad_xaxis_pressed_max\",\n },\n xr_standard_touchpad_yaxis_pressed: {\n componentProperty: \"yAxis\",\n states: [\"default\", \"touched\", \"pressed\"],\n valueNodeProperty: \"transform\",\n valueNodeName: \"xr_standard_touchpad_yaxis_pressed_value\",\n minNodeName: \"xr_standard_touchpad_yaxis_pressed_min\",\n maxNodeName: \"xr_standard_touchpad_yaxis_pressed_max\",\n },\n xr_standard_touchpad_xaxis_touched: {\n componentProperty: \"xAxis\",\n states: [\"default\", \"touched\", \"pressed\"],\n valueNodeProperty: \"transform\",\n valueNodeName: \"xr_standard_touchpad_xaxis_touched_value\",\n minNodeName: \"xr_standard_touchpad_xaxis_touched_min\",\n maxNodeName: \"xr_standard_touchpad_xaxis_touched_max\",\n },\n xr_standard_touchpad_yaxis_touched: {\n componentProperty: \"yAxis\",\n states: [\"default\", \"touched\", \"pressed\"],\n valueNodeProperty: \"transform\",\n valueNodeName: \"xr_standard_touchpad_yaxis_touched_value\",\n minNodeName: \"xr_standard_touchpad_yaxis_touched_min\",\n maxNodeName: \"xr_standard_touchpad_yaxis_touched_max\",\n },\n xr_standard_touchpad_axes_touched: {\n componentProperty: \"state\",\n states: [\"touched\", \"pressed\"],\n valueNodeProperty: \"visibility\",\n valueNodeName: \"xr_standard_touchpad_axes_touched_value\",\n },\n },\n touchPointNodeName: \"xr_standard_touchpad_axes_touched_value\",\n },\n \"xr-standard-thumbstick\": {\n type: \"thumbstick\",\n gamepadIndices: {\n button: 3,\n xAxis: 2,\n yAxis: 3,\n },\n rootNodeName: \"xr_standard_thumbstick\",\n visualResponses: {\n xr_standard_thumbstick_pressed: {\n componentProperty: \"button\",\n states: [\"default\", \"touched\", \"pressed\"],\n valueNodeProperty: \"transform\",\n valueNodeName: \"xr_standard_thumbstick_pressed_value\",\n minNodeName: \"xr_standard_thumbstick_pressed_min\",\n maxNodeName: \"xr_standard_thumbstick_pressed_max\",\n },\n xr_standard_thumbstick_xaxis_pressed: {\n componentProperty: \"xAxis\",\n states: [\"default\", \"touched\", \"pressed\"],\n valueNodeProperty: \"transform\",\n valueNodeName: \"xr_standard_thumbstick_xaxis_pressed_value\",\n minNodeName: \"xr_standard_thumbstick_xaxis_pressed_min\",\n maxNodeName: \"xr_standard_thumbstick_xaxis_pressed_max\",\n },\n xr_standard_thumbstick_yaxis_pressed: {\n componentProperty: \"yAxis\",\n states: [\"default\", \"touched\", \"pressed\"],\n valueNodeProperty: \"transform\",\n valueNodeName: \"xr_standard_thumbstick_yaxis_pressed_value\",\n minNodeName: \"xr_standard_thumbstick_yaxis_pressed_min\",\n maxNodeName: \"xr_standard_thumbstick_yaxis_pressed_max\",\n },\n },\n },\n },\n gamepadMapping: \"xr-standard\",\n rootNodeName: \"microsoft-mixed-reality-left\",\n assetPath: \"left.glb\",\n },\n right: {\n selectComponentId: \"xr-standard-trigger\",\n components: {\n \"xr-standard-trigger\": {\n type: \"trigger\",\n gamepadIndices: {\n button: 0,\n },\n rootNodeName: \"xr_standard_trigger\",\n visualResponses: {\n xr_standard_trigger_pressed: {\n componentProperty: \"button\",\n states: [\"default\", \"touched\", \"pressed\"],\n valueNodeProperty: \"transform\",\n valueNodeName: \"xr_standard_trigger_pressed_value\",\n minNodeName: \"xr_standard_trigger_pressed_min\",\n maxNodeName: \"xr_standard_trigger_pressed_max\",\n },\n },\n },\n \"xr-standard-squeeze\": {\n type: \"squeeze\",\n gamepadIndices: {\n button: 1,\n },\n rootNodeName: \"xr_standard_squeeze\",\n visualResponses: {\n xr_standard_squeeze_pressed: {\n componentProperty: \"button\",\n states: [\"default\", \"touched\", \"pressed\"],\n valueNodeProperty: \"transform\",\n valueNodeName: \"xr_standard_squeeze_pressed_value\",\n minNodeName: \"xr_standard_squeeze_pressed_min\",\n maxNodeName: \"xr_standard_squeeze_pressed_max\",\n },\n },\n },\n \"xr-standard-touchpad\": {\n type: \"touchpad\",\n gamepadIndices: {\n button: 2,\n xAxis: 0,\n yAxis: 1,\n },\n rootNodeName: \"xr_standard_touchpad\",\n visualResponses: {\n xr_standard_touchpad_pressed: {\n componentProperty: \"button\",\n states: [\"default\", \"touched\", \"pressed\"],\n valueNodeProperty: \"transform\",\n valueNodeName: \"xr_standard_touchpad_pressed_value\",\n minNodeName: \"xr_standard_touchpad_pressed_min\",\n maxNodeName: \"xr_standard_touchpad_pressed_max\",\n },\n xr_standard_touchpad_xaxis_pressed: {\n componentProperty: \"xAxis\",\n states: [\"default\", \"touched\", \"pressed\"],\n valueNodeProperty: \"transform\",\n valueNodeName: \"xr_standard_touchpad_xaxis_pressed_value\",\n minNodeName: \"xr_standard_touchpad_xaxis_pressed_min\",\n maxNodeName: \"xr_standard_touchpad_xaxis_pressed_max\",\n },\n xr_standard_touchpad_yaxis_pressed: {\n componentProperty: \"yAxis\",\n states: [\"default\", \"touched\", \"pressed\"],\n valueNodeProperty: \"transform\",\n valueNodeName: \"xr_standard_touchpad_yaxis_pressed_value\",\n minNodeName: \"xr_standard_touchpad_yaxis_pressed_min\",\n maxNodeName: \"xr_standard_touchpad_yaxis_pressed_max\",\n },\n xr_standard_touchpad_xaxis_touched: {\n componentProperty: \"xAxis\",\n states: [\"default\", \"touched\", \"pressed\"],\n valueNodeProperty: \"transform\",\n valueNodeName: \"xr_standard_touchpad_xaxis_touched_value\",\n minNodeName: \"xr_standard_touchpad_xaxis_touched_min\",\n maxNodeName: \"xr_standard_touchpad_xaxis_touched_max\",\n },\n xr_standard_touchpad_yaxis_touched: {\n componentProperty: \"yAxis\",\n states: [\"default\", \"touched\", \"pressed\"],\n valueNodeProperty: \"transform\",\n valueNodeName: \"xr_standard_touchpad_yaxis_touched_value\",\n minNodeName: \"xr_standard_touchpad_yaxis_touched_min\",\n maxNodeName: \"xr_standard_touchpad_yaxis_touched_max\",\n },\n xr_standard_touchpad_axes_touched: {\n componentProperty: \"state\",\n states: [\"touched\", \"pressed\"],\n valueNodeProperty: \"visibility\",\n valueNodeName: \"xr_standard_touchpad_axes_touched_value\",\n },\n },\n touchPointNodeName: \"xr_standard_touchpad_axes_touched_value\",\n },\n \"xr-standard-thumbstick\": {\n type: \"thumbstick\",\n gamepadIndices: {\n button: 3,\n xAxis: 2,\n yAxis: 3,\n },\n rootNodeName: \"xr_standard_thumbstick\",\n visualResponses: {\n xr_standard_thumbstick_pressed: {\n componentProperty: \"button\",\n states: [\"default\", \"touched\", \"pressed\"],\n valueNodeProperty: \"transform\",\n valueNodeName: \"xr_standard_thumbstick_pressed_value\",\n minNodeName: \"xr_standard_thumbstick_pressed_min\",\n maxNodeName: \"xr_standard_thumbstick_pressed_max\",\n },\n xr_standard_thumbstick_xaxis_pressed: {\n componentProperty: \"xAxis\",\n states: [\"default\", \"touched\", \"pressed\"],\n valueNodeProperty: \"transform\",\n valueNodeName: \"xr_standard_thumbstick_xaxis_pressed_value\",\n minNodeName: \"xr_standard_thumbstick_xaxis_pressed_min\",\n maxNodeName: \"xr_standard_thumbstick_xaxis_pressed_max\",\n },\n xr_standard_thumbstick_yaxis_pressed: {\n componentProperty: \"yAxis\",\n states: [\"default\", \"touched\", \"pressed\"],\n valueNodeProperty: \"transform\",\n valueNodeName: \"xr_standard_thumbstick_yaxis_pressed_value\",\n minNodeName: \"xr_standard_thumbstick_yaxis_pressed_min\",\n maxNodeName: \"xr_standard_thumbstick_yaxis_pressed_max\",\n },\n },\n },\n },\n gamepadMapping: \"xr-standard\",\n rootNodeName: \"microsoft-mixed-reality-right\",\n assetPath: \"right.glb\",\n },\n};\n"],"mappings":"AAAA,SAASA,6BAA6B,QAAQ,oCAAoC;AAClF,SAASC,4BAA4B,QAAQ,mCAAmC;AAChF,SAASC,IAAI,QAAQ,sBAAsB;AAC3C,SAASC,UAAU,QAAQ,4BAA4B;AACvD,SAASC,WAAW,QAAQ,8BAA8B;AAC1D,SAASC,MA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