1 |
- {"ast":null,"code":"import { WebXRGenericTriggerMotionController } from \"./webXRGenericMotionController.js\";\nimport { Tools } from \"../../Misc/tools.js\";\nimport { WebXRProfiledMotionController } from \"./webXRProfiledMotionController.js\";\n/**\n * The MotionController Manager manages all registered motion controllers and loads the right one when needed.\n *\n * When this repository is complete: https://github.com/immersive-web/webxr-input-profiles/tree/master/packages/assets\n * it should be replaced with auto-loaded controllers.\n *\n * When using a model try to stay as generic as possible. Eventually there will be no need in any of the controller classes\n */\nconst controllerCache = [];\n/**\n * Motion controller manager is managing the different webxr profiles and makes sure the right\n * controller is being loaded.\n */\nexport class WebXRMotionControllerManager {\n /**\n * Clear the cache used for profile loading and reload when requested again\n */\n static ClearProfilesCache() {\n this._ProfilesList = null;\n this._ProfileLoadingPromises = {};\n }\n /**\n * Register the default fallbacks.\n * This function is called automatically when this file is imported.\n */\n static DefaultFallbacks() {\n this.RegisterFallbacksForProfileId(\"google-daydream\", [\"generic-touchpad\"]);\n this.RegisterFallbacksForProfileId(\"htc-vive-focus\", [\"generic-trigger-touchpad\"]);\n this.RegisterFallbacksForProfileId(\"htc-vive\", [\"generic-trigger-squeeze-touchpad\"]);\n this.RegisterFallbacksForProfileId(\"magicleap-one\", [\"generic-trigger-squeeze-touchpad\"]);\n this.RegisterFallbacksForProfileId(\"windows-mixed-reality\", [\"generic-trigger-squeeze-touchpad-thumbstick\"]);\n this.RegisterFallbacksForProfileId(\"microsoft-mixed-reality\", [\"windows-mixed-reality\", \"generic-trigger-squeeze-touchpad-thumbstick\"]);\n this.RegisterFallbacksForProfileId(\"oculus-go\", [\"generic-trigger-touchpad\"]);\n this.RegisterFallbacksForProfileId(\"oculus-touch-v2\", [\"oculus-touch\", \"generic-trigger-squeeze-thumbstick\"]);\n this.RegisterFallbacksForProfileId(\"oculus-touch\", [\"generic-trigger-squeeze-thumbstick\"]);\n this.RegisterFallbacksForProfileId(\"samsung-gearvr\", [\"windows-mixed-reality\", \"generic-trigger-squeeze-touchpad-thumbstick\"]);\n this.RegisterFallbacksForProfileId(\"samsung-odyssey\", [\"generic-touchpad\"]);\n this.RegisterFallbacksForProfileId(\"valve-index\", [\"generic-trigger-squeeze-touchpad-thumbstick\"]);\n this.RegisterFallbacksForProfileId(\"generic-hand-select\", [\"generic-trigger\"]);\n }\n /**\n * Find a fallback profile if the profile was not found. There are a few predefined generic profiles.\n * @param profileId the profile to which a fallback needs to be found\n * @returns an array with corresponding fallback profiles\n */\n static FindFallbackWithProfileId(profileId) {\n const returnArray = this._Fallbacks[profileId] || [];\n returnArray.unshift(profileId);\n return returnArray;\n }\n /**\n * When acquiring a new xrInput object (usually by the WebXRInput class), match it with the correct profile.\n * The order of search:\n *\n * 1) Iterate the profiles array of the xr input and try finding a corresponding motion controller\n * 2) (If not found) search in the gamepad id and try using it (legacy versions only)\n * 3) search for registered fallbacks (should be redundant, nonetheless it makes sense to check)\n * 4) return the generic trigger controller if none were found\n *\n * @param xrInput the xrInput to which a new controller is initialized\n * @param scene the scene to which the model will be added\n * @param forceProfile force a certain profile for this controller\n * @returns A promise that fulfils with the motion controller class for this profile id or the generic standard class if none was found\n */\n static GetMotionControllerWithXRInput(xrInput, scene, forceProfile) {\n const profileArray = [];\n if (forceProfile) {\n profileArray.push(forceProfile);\n }\n profileArray.push(...(xrInput.profiles || []));\n // emulator support\n if (profileArray.length && !profileArray[0]) {\n // remove the first \"undefined\" that the emulator is adding\n profileArray.pop();\n }\n // legacy support - try using the gamepad id\n if (xrInput.gamepad && xrInput.gamepad.id) {\n switch (xrInput.gamepad.id) {\n case xrInput.gamepad.id.match(/oculus touch/gi) ? xrInput.gamepad.id : undefined:\n // oculus in gamepad id\n profileArray.push(\"oculus-touch-v2\");\n break;\n }\n }\n // make sure microsoft/windows mixed reality works correctly\n const windowsMRIdx = profileArray.indexOf(\"windows-mixed-reality\");\n if (windowsMRIdx !== -1) {\n profileArray.splice(windowsMRIdx, 0, \"microsoft-mixed-reality\");\n }\n if (!profileArray.length) {\n profileArray.push(\"generic-trigger\");\n }\n if (this.UseOnlineRepository) {\n const firstFunction = this.PrioritizeOnlineRepository ? this._LoadProfileFromRepository : this._LoadProfilesFromAvailableControllers;\n const secondFunction = this.PrioritizeOnlineRepository ? this._LoadProfilesFromAvailableControllers : this._LoadProfileFromRepository;\n return firstFunction.call(this, profileArray, xrInput, scene).catch(() => {\n return secondFunction.call(this, profileArray, xrInput, scene);\n });\n } else {\n // use only available functions\n return this._LoadProfilesFromAvailableControllers(profileArray, xrInput, scene);\n }\n }\n /**\n * Register a new controller based on its profile. This function will be called by the controller classes themselves.\n *\n * If you are missing a profile, make sure it is imported in your source, otherwise it will not register.\n *\n * @param type the profile type to register\n * @param constructFunction the function to be called when loading this profile\n */\n static RegisterController(type, constructFunction) {\n this._AvailableControllers[type] = constructFunction;\n }\n /**\n * Register a fallback to a specific profile.\n * @param profileId the profileId that will receive the fallbacks\n * @param fallbacks A list of fallback profiles\n */\n static RegisterFallbacksForProfileId(profileId, fallbacks) {\n if (this._Fallbacks[profileId]) {\n this._Fallbacks[profileId].push(...fallbacks);\n } else {\n this._Fallbacks[profileId] = fallbacks;\n }\n }\n /**\n * Will update the list of profiles available in the repository\n * @returns a promise that resolves to a map of profiles available online\n */\n static UpdateProfilesList() {\n this._ProfilesList = Tools.LoadFileAsync(this.BaseRepositoryUrl + \"/profiles/profilesList.json\", false).then(data => {\n return JSON.parse(data);\n });\n return this._ProfilesList;\n }\n /**\n * Clear the controller's cache (usually happens at the end of a session)\n */\n static ClearControllerCache() {\n controllerCache.forEach(cacheItem => {\n cacheItem.meshes.forEach(mesh => {\n mesh.dispose(false, true);\n });\n });\n controllerCache.length = 0;\n }\n static _LoadProfileFromRepository(profileArray, xrInput, scene) {\n return Promise.resolve().then(() => {\n if (!this._ProfilesList) {\n return this.UpdateProfilesList();\n } else {\n return this._ProfilesList;\n }\n }).then(profilesList => {\n // load the right profile\n for (let i = 0; i < profileArray.length; ++i) {\n // defensive\n if (!profileArray[i]) {\n continue;\n }\n if (profilesList[profileArray[i]]) {\n return profileArray[i];\n }\n }\n throw new Error(`neither controller ${profileArray[0]} nor all fallbacks were found in the repository,`);\n }).then(profileToLoad => {\n // load the profile\n if (!this._ProfileLoadingPromises[profileToLoad]) {\n this._ProfileLoadingPromises[profileToLoad] = Tools.LoadFileAsync(`${this.BaseRepositoryUrl}/profiles/${profileToLoad}/profile.json`, false).then(data => JSON.parse(data));\n }\n return this._ProfileLoadingPromises[profileToLoad];\n }).then(profile => {\n return new WebXRProfiledMotionController(scene, xrInput, profile, this.BaseRepositoryUrl, this.DisableControllerCache ? undefined : controllerCache);\n });\n }\n static _LoadProfilesFromAvailableControllers(profileArray, xrInput, scene) {\n // check fallbacks\n for (let i = 0; i < profileArray.length; ++i) {\n // defensive\n if (!profileArray[i]) {\n continue;\n }\n const fallbacks = this.FindFallbackWithProfileId(profileArray[i]);\n for (let j = 0; j < fallbacks.length; ++j) {\n const constructionFunction = this._AvailableControllers[fallbacks[j]];\n if (constructionFunction) {\n return Promise.resolve(constructionFunction(xrInput, scene));\n }\n }\n }\n throw new Error(`no controller requested was found in the available controllers list`);\n }\n}\nWebXRMotionControllerManager._AvailableControllers = {};\nWebXRMotionControllerManager._Fallbacks = {};\n// cache for loading\nWebXRMotionControllerManager._ProfileLoadingPromises = {};\n/**\n * The base URL of the online controller repository. Can be changed at any time.\n */\nWebXRMotionControllerManager.BaseRepositoryUrl = \"https://immersive-web.github.io/webxr-input-profiles/packages/viewer/dist\";\n/**\n * Which repository gets priority - local or online\n */\nWebXRMotionControllerManager.PrioritizeOnlineRepository = true;\n/**\n * Use the online repository, or use only locally-defined controllers\n */\nWebXRMotionControllerManager.UseOnlineRepository = true;\n/**\n * Disable the controller cache and load the models each time a new WebXRProfileMotionController is loaded.\n * Defaults to true.\n */\nWebXRMotionControllerManager.DisableControllerCache = true;\n// register the generic profile(s) here so we will at least have them\nWebXRMotionControllerManager.RegisterController(WebXRGenericTriggerMotionController.ProfileId, (xrInput, scene) => {\n return new WebXRGenericTriggerMotionController(scene, xrInput.gamepad, xrInput.handedness);\n});\n// register fallbacks\nWebXRMotionControllerManager.DefaultFallbacks();","map":{"version":3,"names":["WebXRGenericTriggerMotionController","Tools","WebXRProfiledMotionController","controllerCache","WebXRMotionControllerManager","ClearProfilesCache","_ProfilesList","_ProfileLoadingPromises","DefaultFallbacks","RegisterFallbacksForProfileId","FindFallbackWithProfileId","profileId","returnArray","_Fallbacks","unshift","GetMotionControllerWithXRInput","xrInput","scene","forceProfile","profileArray","push","profiles","length","pop","gamepad","id","match","undefined","windowsMRIdx","indexOf","splice","UseOnlineRepository","firstFunction","PrioritizeOnlineRepository","_LoadProfileFromRepository","_LoadProfilesFromAvailableControllers","secondFunction","call","catch","RegisterController","type","constructFunction","_AvailableControllers","fallbacks","UpdateProfilesList","LoadFileAsync","BaseRepositoryUrl","then","data","JSON","parse","ClearControllerCache","forEach","cacheItem","meshes","mesh","dispose","Promise","resolve","profilesList","i","Error","profileToLoad","profile","DisableControllerCache","j","constructionFunction","ProfileId","handedness"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/XR/motionController/webXRMotionControllerManager.js"],"sourcesContent":["import { WebXRGenericTriggerMotionController } from \"./webXRGenericMotionController.js\";\nimport { Tools } from \"../../Misc/tools.js\";\nimport { WebXRProfiledMotionController } from \"./webXRProfiledMotionController.js\";\n/**\n * The MotionController Manager manages all registered motion controllers and loads the right one when needed.\n *\n * When this repository is complete: https://github.com/immersive-web/webxr-input-profiles/tree/master/packages/assets\n * it should be replaced with auto-loaded controllers.\n *\n * When using a model try to stay as generic as possible. Eventually there will be no need in any of the controller classes\n */\nconst controllerCache = [];\n/**\n * Motion controller manager is managing the different webxr profiles and makes sure the right\n * controller is being loaded.\n */\nexport class WebXRMotionControllerManager {\n /**\n * Clear the cache used for profile loading and reload when requested again\n */\n static ClearProfilesCache() {\n this._ProfilesList = null;\n this._ProfileLoadingPromises = {};\n }\n /**\n * Register the default fallbacks.\n * This function is called automatically when this file is imported.\n */\n static DefaultFallbacks() {\n this.RegisterFallbacksForProfileId(\"google-daydream\", [\"generic-touchpad\"]);\n this.RegisterFallbacksForProfileId(\"htc-vive-focus\", [\"generic-trigger-touchpad\"]);\n this.RegisterFallbacksForProfileId(\"htc-vive\", [\"generic-trigger-squeeze-touchpad\"]);\n this.RegisterFallbacksForProfileId(\"magicleap-one\", [\"generic-trigger-squeeze-touchpad\"]);\n this.RegisterFallbacksForProfileId(\"windows-mixed-reality\", [\"generic-trigger-squeeze-touchpad-thumbstick\"]);\n this.RegisterFallbacksForProfileId(\"microsoft-mixed-reality\", [\"windows-mixed-reality\", \"generic-trigger-squeeze-touchpad-thumbstick\"]);\n this.RegisterFallbacksForProfileId(\"oculus-go\", [\"generic-trigger-touchpad\"]);\n this.RegisterFallbacksForProfileId(\"oculus-touch-v2\", [\"oculus-touch\", \"generic-trigger-squeeze-thumbstick\"]);\n this.RegisterFallbacksForProfileId(\"oculus-touch\", [\"generic-trigger-squeeze-thumbstick\"]);\n this.RegisterFallbacksForProfileId(\"samsung-gearvr\", [\"windows-mixed-reality\", \"generic-trigger-squeeze-touchpad-thumbstick\"]);\n this.RegisterFallbacksForProfileId(\"samsung-odyssey\", [\"generic-touchpad\"]);\n this.RegisterFallbacksForProfileId(\"valve-index\", [\"generic-trigger-squeeze-touchpad-thumbstick\"]);\n this.RegisterFallbacksForProfileId(\"generic-hand-select\", [\"generic-trigger\"]);\n }\n /**\n * Find a fallback profile if the profile was not found. There are a few predefined generic profiles.\n * @param profileId the profile to which a fallback needs to be found\n * @returns an array with corresponding fallback profiles\n */\n static FindFallbackWithProfileId(profileId) {\n const returnArray = this._Fallbacks[profileId] || [];\n returnArray.unshift(profileId);\n return returnArray;\n }\n /**\n * When acquiring a new xrInput object (usually by the WebXRInput class), match it with the correct profile.\n * The order of search:\n *\n * 1) Iterate the profiles array of the xr input and try finding a corresponding motion controller\n * 2) (If not found) search in the gamepad id and try using it (legacy versions only)\n * 3) search for registered fallbacks (should be redundant, nonetheless it makes sense to check)\n * 4) return the generic trigger controller if none were found\n *\n * @param xrInput the xrInput to which a new controller is initialized\n * @param scene the scene to which the model will be added\n * @param forceProfile force a certain profile for this controller\n * @returns A promise that fulfils with the motion controller class for this profile id or the generic standard class if none was found\n */\n static GetMotionControllerWithXRInput(xrInput, scene, forceProfile) {\n const profileArray = [];\n if (forceProfile) {\n profileArray.push(forceProfile);\n }\n profileArray.push(...(xrInput.profiles || []));\n // emulator support\n if (profileArray.length && !profileArray[0]) {\n // remove the first \"undefined\" that the emulator is adding\n profileArray.pop();\n }\n // legacy support - try using the gamepad id\n if (xrInput.gamepad && xrInput.gamepad.id) {\n switch (xrInput.gamepad.id) {\n case xrInput.gamepad.id.match(/oculus touch/gi) ? xrInput.gamepad.id : undefined:\n // oculus in gamepad id\n profileArray.push(\"oculus-touch-v2\");\n break;\n }\n }\n // make sure microsoft/windows mixed reality works correctly\n const windowsMRIdx = profileArray.indexOf(\"windows-mixed-reality\");\n if (windowsMRIdx !== -1) {\n profileArray.splice(windowsMRIdx, 0, \"microsoft-mixed-reality\");\n }\n if (!profileArray.length) {\n profileArray.push(\"generic-trigger\");\n }\n if (this.UseOnlineRepository) {\n const firstFunction = this.PrioritizeOnlineRepository ? this._LoadProfileFromRepository : this._LoadProfilesFromAvailableControllers;\n const secondFunction = this.PrioritizeOnlineRepository ? this._LoadProfilesFromAvailableControllers : this._LoadProfileFromRepository;\n return firstFunction.call(this, profileArray, xrInput, scene).catch(() => {\n return secondFunction.call(this, profileArray, xrInput, scene);\n });\n }\n else {\n // use only available functions\n return this._LoadProfilesFromAvailableControllers(profileArray, xrInput, scene);\n }\n }\n /**\n * Register a new controller based on its profile. This function will be called by the controller classes themselves.\n *\n * If you are missing a profile, make sure it is imported in your source, otherwise it will not register.\n *\n * @param type the profile type to register\n * @param constructFunction the function to be called when loading this profile\n */\n static RegisterController(type, constructFunction) {\n this._AvailableControllers[type] = constructFunction;\n }\n /**\n * Register a fallback to a specific profile.\n * @param profileId the profileId that will receive the fallbacks\n * @param fallbacks A list of fallback profiles\n */\n static RegisterFallbacksForProfileId(profileId, fallbacks) {\n if (this._Fallbacks[profileId]) {\n this._Fallbacks[profileId].push(...fallbacks);\n }\n else {\n this._Fallbacks[profileId] = fallbacks;\n }\n }\n /**\n * Will update the list of profiles available in the repository\n * @returns a promise that resolves to a map of profiles available online\n */\n static UpdateProfilesList() {\n this._ProfilesList = Tools.LoadFileAsync(this.BaseRepositoryUrl + \"/profiles/profilesList.json\", false).then((data) => {\n return JSON.parse(data);\n });\n return this._ProfilesList;\n }\n /**\n * Clear the controller's cache (usually happens at the end of a session)\n */\n static ClearControllerCache() {\n controllerCache.forEach((cacheItem) => {\n cacheItem.meshes.forEach((mesh) => {\n mesh.dispose(false, true);\n });\n });\n controllerCache.length = 0;\n }\n static _LoadProfileFromRepository(profileArray, xrInput, scene) {\n return Promise.resolve()\n .then(() => {\n if (!this._ProfilesList) {\n return this.UpdateProfilesList();\n }\n else {\n return this._ProfilesList;\n }\n })\n .then((profilesList) => {\n // load the right profile\n for (let i = 0; i < profileArray.length; ++i) {\n // defensive\n if (!profileArray[i]) {\n continue;\n }\n if (profilesList[profileArray[i]]) {\n return profileArray[i];\n }\n }\n throw new Error(`neither controller ${profileArray[0]} nor all fallbacks were found in the repository,`);\n })\n .then((profileToLoad) => {\n // load the profile\n if (!this._ProfileLoadingPromises[profileToLoad]) {\n this._ProfileLoadingPromises[profileToLoad] = Tools.LoadFileAsync(`${this.BaseRepositoryUrl}/profiles/${profileToLoad}/profile.json`, false).then((data) => JSON.parse(data));\n }\n return this._ProfileLoadingPromises[profileToLoad];\n })\n .then((profile) => {\n return new WebXRProfiledMotionController(scene, xrInput, profile, this.BaseRepositoryUrl, this.DisableControllerCache ? undefined : controllerCache);\n });\n }\n static _LoadProfilesFromAvailableControllers(profileArray, xrInput, scene) {\n // check fallbacks\n for (let i = 0; i < profileArray.length; ++i) {\n // defensive\n if (!profileArray[i]) {\n continue;\n }\n const fallbacks = this.FindFallbackWithProfileId(profileArray[i]);\n for (let j = 0; j < fallbacks.length; ++j) {\n const constructionFunction = this._AvailableControllers[fallbacks[j]];\n if (constructionFunction) {\n return Promise.resolve(constructionFunction(xrInput, scene));\n }\n }\n }\n throw new Error(`no controller requested was found in the available controllers list`);\n }\n}\nWebXRMotionControllerManager._AvailableControllers = {};\nWebXRMotionControllerManager._Fallbacks = {};\n// cache for loading\nWebXRMotionControllerManager._ProfileLoadingPromises = {};\n/**\n * The base URL of the online controller repository. Can be changed at any time.\n */\nWebXRMotionControllerManager.BaseRepositoryUrl = \"https://immersive-web.github.io/webxr-input-profiles/packages/viewer/dist\";\n/**\n * Which repository gets priority - local or online\n */\nWebXRMotionControllerManager.PrioritizeOnlineRepository = true;\n/**\n * Use the online repository, or use only locally-defined controllers\n */\nWebXRMotionControllerManager.UseOnlineRepository = true;\n/**\n * Disable the controller cache and load the models each time a new WebXRProfileMotionController is loaded.\n * Defaults to true.\n */\nWebXRMotionControllerManager.DisableControllerCache = true;\n// register the generic profile(s) here so we will at least have them\nWebXRMotionControllerManager.RegisterController(WebXRGenericTriggerMotionController.ProfileId, (xrInput, scene) => {\n return new WebXRGenericTriggerMotionController(scene, xrInput.gamepad, xrInput.handedness);\n});\n// register fallbacks\nWebXRMotionControllerManager.DefaultFallbacks();\n"],"mappings":"AAAA,SAASA,mCAAmC,QAAQ,mCAAmC;AACvF,SAASC,KAAK,QAAQ,qBAAqB;AAC3C,SAASC,6BAA6B,QAAQ,oCAAoC;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,eAAe,GAAG,EAAE;AAC1B;AACA;AACA;AACA;AACA,OAAO,MAAMC,4BAA4B,CAAC;EACtC;AACJ;AACA;EACI,OAAOC,kBAAkBA,CAAA,EAAG;IACxB,IAAI,CAACC,aAAa,GAAG,IAAI;IACzB,IAAI,CAACC,uBAAuB,GAAG,CAAC,CAAC;EACrC;EACA;AACJ;AACA;AACA;EACI,OAAOC,gBAAgBA,CAAA,E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