950be083349831c2bc0278a5cc9b66f26f38b4853783c09a853c39d383462033.json 24 KB

1
  1. {"ast":null,"code":"import { CameraInputTypes } from \"../../Cameras/cameraInputsManager.js\";\nimport { Quaternion } from \"../../Maths/math.vector.js\";\nimport { Tools } from \"../../Misc/tools.js\";\nimport { FreeCameraInputsManager } from \"../../Cameras/freeCameraInputsManager.js\";\nimport { Observable } from \"../../Misc/observable.js\";\n/**\n * Add orientation input support to the input manager.\n * @param smoothFactor deviceOrientation smoothing. 0: no smoothing, 1: new data ignored, 0.9 recommended for smoothing\n * @returns the current input manager\n */\nFreeCameraInputsManager.prototype.addDeviceOrientation = function (smoothFactor) {\n if (!this._deviceOrientationInput) {\n this._deviceOrientationInput = new FreeCameraDeviceOrientationInput();\n if (smoothFactor) {\n this._deviceOrientationInput.smoothFactor = smoothFactor;\n }\n this.add(this._deviceOrientationInput);\n }\n return this;\n};\n/**\n * Takes information about the orientation of the device as reported by the deviceorientation event to orient the camera.\n * Screen rotation is taken into account.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/cameras/customizingCameraInputs\n */\nexport class FreeCameraDeviceOrientationInput {\n /**\n * Can be used to detect if a device orientation sensor is available on a device\n * @param timeout amount of time in milliseconds to wait for a response from the sensor (default: infinite)\n * @returns a promise that will resolve on orientation change\n */\n static WaitForOrientationChangeAsync(timeout) {\n return new Promise((res, rej) => {\n let gotValue = false;\n const eventHandler = () => {\n window.removeEventListener(\"deviceorientation\", eventHandler);\n gotValue = true;\n res();\n };\n // If timeout is populated reject the promise\n if (timeout) {\n setTimeout(() => {\n if (!gotValue) {\n window.removeEventListener(\"deviceorientation\", eventHandler);\n rej(\"WaitForOrientationChangeAsync timed out\");\n }\n }, timeout);\n }\n if (typeof DeviceOrientationEvent !== \"undefined\" && typeof DeviceOrientationEvent.requestPermission === \"function\") {\n DeviceOrientationEvent.requestPermission().then(response => {\n if (response == \"granted\") {\n window.addEventListener(\"deviceorientation\", eventHandler);\n } else {\n Tools.Warn(\"Permission not granted.\");\n }\n }).catch(error => {\n Tools.Error(error);\n });\n } else {\n window.addEventListener(\"deviceorientation\", eventHandler);\n }\n });\n }\n /**\n * Instantiates a new input\n * @see https://doc.babylonjs.com/features/featuresDeepDive/cameras/customizingCameraInputs\n */\n constructor() {\n this._screenOrientationAngle = 0;\n this._screenQuaternion = new Quaternion();\n this._alpha = 0;\n this._beta = 0;\n this._gamma = 0;\n /** alpha+beta+gamma smoothing. 0: no smoothing, 1: new data ignored, 0.9 recommended for smoothing */\n this.smoothFactor = 0;\n /**\n * @internal\n */\n this._onDeviceOrientationChangedObservable = new Observable();\n this._orientationChanged = () => {\n this._screenOrientationAngle = window.orientation !== undefined ? +window.orientation : window.screen.orientation && window.screen.orientation[\"angle\"] ? window.screen.orientation.angle : 0;\n this._screenOrientationAngle = -Tools.ToRadians(this._screenOrientationAngle / 2);\n this._screenQuaternion.copyFromFloats(0, Math.sin(this._screenOrientationAngle), 0, Math.cos(this._screenOrientationAngle));\n };\n this._deviceOrientation = evt => {\n if (this.smoothFactor) {\n this._alpha = evt.alpha !== null ? Tools.SmoothAngleChange(this._alpha, evt.alpha, this.smoothFactor) : 0;\n this._beta = evt.beta !== null ? Tools.SmoothAngleChange(this._beta, evt.beta, this.smoothFactor) : 0;\n this._gamma = evt.gamma !== null ? Tools.SmoothAngleChange(this._gamma, evt.gamma, this.smoothFactor) : 0;\n } else {\n this._alpha = evt.alpha !== null ? evt.alpha : 0;\n this._beta = evt.beta !== null ? evt.beta : 0;\n this._gamma = evt.gamma !== null ? evt.gamma : 0;\n }\n if (evt.alpha !== null) {\n this._onDeviceOrientationChangedObservable.notifyObservers();\n }\n };\n this._constantTransform = new Quaternion(-Math.sqrt(0.5), 0, 0, Math.sqrt(0.5));\n this._orientationChanged();\n }\n /**\n * Define the camera controlled by the input.\n */\n get camera() {\n return this._camera;\n }\n set camera(camera) {\n this._camera = camera;\n if (this._camera != null && !this._camera.rotationQuaternion) {\n this._camera.rotationQuaternion = new Quaternion();\n }\n if (this._camera) {\n this._camera.onDisposeObservable.add(() => {\n this._onDeviceOrientationChangedObservable.clear();\n });\n }\n }\n /**\n * Attach the input controls to a specific dom element to get the input from.\n */\n attachControl() {\n const hostWindow = this.camera.getScene().getEngine().getHostWindow();\n if (hostWindow) {\n const eventHandler = () => {\n hostWindow.addEventListener(\"orientationchange\", this._orientationChanged);\n hostWindow.addEventListener(\"deviceorientation\", this._deviceOrientation);\n //In certain cases, the attach control is called AFTER orientation was changed,\n //So this is needed.\n this._orientationChanged();\n };\n if (typeof DeviceOrientationEvent !== \"undefined\" && typeof DeviceOrientationEvent.requestPermission === \"function\") {\n DeviceOrientationEvent.requestPermission().then(response => {\n if (response === \"granted\") {\n eventHandler();\n } else {\n Tools.Warn(\"Permission not granted.\");\n }\n }).catch(error => {\n Tools.Error(error);\n });\n } else {\n eventHandler();\n }\n }\n }\n /**\n * Detach the current controls from the specified dom element.\n */\n detachControl() {\n window.removeEventListener(\"orientationchange\", this._orientationChanged);\n window.removeEventListener(\"deviceorientation\", this._deviceOrientation);\n this._alpha = 0;\n }\n /**\n * Update the current camera state depending on the inputs that have been used this frame.\n * This is a dynamically created lambda to avoid the performance penalty of looping for inputs in the render loop.\n */\n checkInputs() {\n // if no device orientation provided, don't update the rotation.\n // Only testing against alpha under the assumption that orientation will never be so exact when set.\n if (!this._alpha) {\n return;\n }\n Quaternion.RotationYawPitchRollToRef(Tools.ToRadians(this._alpha), Tools.ToRadians(this._beta), -Tools.ToRadians(this._gamma), this.camera.rotationQuaternion);\n this._camera.rotationQuaternion.multiplyInPlace(this._screenQuaternion);\n this._camera.rotationQuaternion.multiplyInPlace(this._constantTransform);\n if (this._camera.getScene().useRightHandedSystem) {\n this._camera.rotationQuaternion.y *= -1;\n } else {\n this._camera.rotationQuaternion.z *= -1;\n }\n this._camera.rotationQuaternion.w *= -1;\n }\n /**\n * Gets the class name of the current input.\n * @returns the class name\n */\n getClassName() {\n return \"FreeCameraDeviceOrientationInput\";\n }\n /**\n * Get the friendly name associated with the input class.\n * @returns the input friendly name\n */\n getSimpleName() {\n return \"deviceOrientation\";\n }\n}\nCameraInputTypes[\"FreeCameraDeviceOrientationInput\"] = FreeCameraDeviceOrientationInput;","map":{"version":3,"names":["CameraInputTypes","Quaternion","Tools","FreeCameraInputsManager","Observable","prototype","addDeviceOrientation","smoothFactor","_deviceOrientationInput","FreeCameraDeviceOrientationInput","add","WaitForOrientationChangeAsync","timeout","Promise","res","rej","gotValue","eventHandler","window","removeEventListener","setTimeout","DeviceOrientationEvent","requestPermission","then","response","addEventListener","Warn","catch","error","Error","constructor","_screenOrientationAngle","_screenQuaternion","_alpha","_beta","_gamma","_onDeviceOrientationChangedObservable","_orientationChanged","orientation","undefined","screen","angle","ToRadians","copyFromFloats","Math","sin","cos","_deviceOrientation","evt","alpha","SmoothAngleChange","beta","gamma","notifyObservers","_constantTransform","sqrt","camera","_camera","rotationQuaternion","onDisposeObservable","clear","attachControl","hostWindow","getScene","getEngine","getHostWindow","detachControl","checkInputs","RotationYawPitchRollToRef","multiplyInPlace","useRightHandedSystem","y","z","w","getClassName","getSimpleName"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/Cameras/Inputs/freeCameraDeviceOrientationInput.js"],"sourcesContent":["import { CameraInputTypes } from \"../../Cameras/cameraInputsManager.js\";\nimport { Quaternion } from \"../../Maths/math.vector.js\";\nimport { Tools } from \"../../Misc/tools.js\";\nimport { FreeCameraInputsManager } from \"../../Cameras/freeCameraInputsManager.js\";\nimport { Observable } from \"../../Misc/observable.js\";\n/**\n * Add orientation input support to the input manager.\n * @param smoothFactor deviceOrientation smoothing. 0: no smoothing, 1: new data ignored, 0.9 recommended for smoothing\n * @returns the current input manager\n */\nFreeCameraInputsManager.prototype.addDeviceOrientation = function (smoothFactor) {\n if (!this._deviceOrientationInput) {\n this._deviceOrientationInput = new FreeCameraDeviceOrientationInput();\n if (smoothFactor) {\n this._deviceOrientationInput.smoothFactor = smoothFactor;\n }\n this.add(this._deviceOrientationInput);\n }\n return this;\n};\n/**\n * Takes information about the orientation of the device as reported by the deviceorientation event to orient the camera.\n * Screen rotation is taken into account.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/cameras/customizingCameraInputs\n */\nexport class FreeCameraDeviceOrientationInput {\n /**\n * Can be used to detect if a device orientation sensor is available on a device\n * @param timeout amount of time in milliseconds to wait for a response from the sensor (default: infinite)\n * @returns a promise that will resolve on orientation change\n */\n static WaitForOrientationChangeAsync(timeout) {\n return new Promise((res, rej) => {\n let gotValue = false;\n const eventHandler = () => {\n window.removeEventListener(\"deviceorientation\", eventHandler);\n gotValue = true;\n res();\n };\n // If timeout is populated reject the promise\n if (timeout) {\n setTimeout(() => {\n if (!gotValue) {\n window.removeEventListener(\"deviceorientation\", eventHandler);\n rej(\"WaitForOrientationChangeAsync timed out\");\n }\n }, timeout);\n }\n if (typeof DeviceOrientationEvent !== \"undefined\" && typeof DeviceOrientationEvent.requestPermission === \"function\") {\n DeviceOrientationEvent\n .requestPermission()\n .then((response) => {\n if (response == \"granted\") {\n window.addEventListener(\"deviceorientation\", eventHandler);\n }\n else {\n Tools.Warn(\"Permission not granted.\");\n }\n })\n .catch((error) => {\n Tools.Error(error);\n });\n }\n else {\n window.addEventListener(\"deviceorientation\", eventHandler);\n }\n });\n }\n /**\n * Instantiates a new input\n * @see https://doc.babylonjs.com/features/featuresDeepDive/cameras/customizingCameraInputs\n */\n constructor() {\n this._screenOrientationAngle = 0;\n this._screenQuaternion = new Quaternion();\n this._alpha = 0;\n this._beta = 0;\n this._gamma = 0;\n /** alpha+beta+gamma smoothing. 0: no smoothing, 1: new data ignored, 0.9 recommended for smoothing */\n this.smoothFactor = 0;\n /**\n * @internal\n */\n this._onDeviceOrientationChangedObservable = new Observable();\n this._orientationChanged = () => {\n this._screenOrientationAngle =\n window.orientation !== undefined\n ? +window.orientation\n : window.screen.orientation && window.screen.orientation[\"angle\"]\n ? window.screen.orientation.angle\n : 0;\n this._screenOrientationAngle = -Tools.ToRadians(this._screenOrientationAngle / 2);\n this._screenQuaternion.copyFromFloats(0, Math.sin(this._screenOrientationAngle), 0, Math.cos(this._screenOrientationAngle));\n };\n this._deviceOrientation = (evt) => {\n if (this.smoothFactor) {\n this._alpha = evt.alpha !== null ? Tools.SmoothAngleChange(this._alpha, evt.alpha, this.smoothFactor) : 0;\n this._beta = evt.beta !== null ? Tools.SmoothAngleChange(this._beta, evt.beta, this.smoothFactor) : 0;\n this._gamma = evt.gamma !== null ? Tools.SmoothAngleChange(this._gamma, evt.gamma, this.smoothFactor) : 0;\n }\n else {\n this._alpha = evt.alpha !== null ? evt.alpha : 0;\n this._beta = evt.beta !== null ? evt.beta : 0;\n this._gamma = evt.gamma !== null ? evt.gamma : 0;\n }\n if (evt.alpha !== null) {\n this._onDeviceOrientationChangedObservable.notifyObservers();\n }\n };\n this._constantTransform = new Quaternion(-Math.sqrt(0.5), 0, 0, Math.sqrt(0.5));\n this._orientationChanged();\n }\n /**\n * Define the camera controlled by the input.\n */\n get camera() {\n return this._camera;\n }\n set camera(camera) {\n this._camera = camera;\n if (this._camera != null && !this._camera.rotationQuaternion) {\n this._camera.rotationQuaternion = new Quaternion();\n }\n if (this._camera) {\n this._camera.onDisposeObservable.add(() => {\n this._onDeviceOrientationChangedObservable.clear();\n });\n }\n }\n /**\n * Attach the input controls to a specific dom element to get the input from.\n */\n attachControl() {\n const hostWindow = this.camera.getScene().getEngine().getHostWindow();\n if (hostWindow) {\n const eventHandler = () => {\n hostWindow.addEventListener(\"orientationchange\", this._orientationChanged);\n hostWindow.addEventListener(\"deviceorientation\", this._deviceOrientation);\n //In certain cases, the attach control is called AFTER orientation was changed,\n //So this is needed.\n this._orientationChanged();\n };\n if (typeof DeviceOrientationEvent !== \"undefined\" && typeof DeviceOrientationEvent.requestPermission === \"function\") {\n DeviceOrientationEvent\n .requestPermission()\n .then((response) => {\n if (response === \"granted\") {\n eventHandler();\n }\n else {\n Tools.Warn(\"Permission not granted.\");\n }\n })\n .catch((error) => {\n Tools.Error(error);\n });\n }\n else {\n eventHandler();\n }\n }\n }\n /**\n * Detach the current controls from the specified dom element.\n */\n detachControl() {\n window.removeEventListener(\"orientationchange\", this._orientationChanged);\n window.removeEventListener(\"deviceorientation\", this._deviceOrientation);\n this._alpha = 0;\n }\n /**\n * Update the current camera state depending on the inputs that have been used this frame.\n * This is a dynamically created lambda to avoid the performance penalty of looping for inputs in the render loop.\n */\n checkInputs() {\n // if no device orientation provided, don't update the rotation.\n // Only testing against alpha under the assumption that orientation will never be so exact when set.\n if (!this._alpha) {\n return;\n }\n Quaternion.RotationYawPitchRollToRef(Tools.ToRadians(this._alpha), Tools.ToRadians(this._beta), -Tools.ToRadians(this._gamma), this.camera.rotationQuaternion);\n this._camera.rotationQuaternion.multiplyInPlace(this._screenQuaternion);\n this._camera.rotationQuaternion.multiplyInPlace(this._constantTransform);\n if (this._camera.getScene().useRightHandedSystem) {\n this._camera.rotationQuaternion.y *= -1;\n }\n else {\n this._camera.rotationQuaternion.z *= -1;\n }\n this._camera.rotationQuaternion.w *= -1;\n }\n /**\n * Gets the class name of the current input.\n * @returns the class name\n */\n getClassName() {\n return \"FreeCameraDeviceOrientationInput\";\n }\n /**\n * Get the friendly name associated with the input class.\n * @returns the input friendly name\n */\n getSimpleName() {\n return \"deviceOrientation\";\n }\n}\nCameraInputTypes[\"FreeCameraDeviceOrientationInput\"] = FreeCameraDeviceOrientationInput;\n"],"mappings":"AAAA,SAASA,gBAAgB,QAAQ,sCAAsC;AACvE,SAASC,UAAU,QAAQ,4BAA4B;AACvD,SAASC,KAAK,QAAQ,qBAAqB;AAC3C,SAASC,uBAAuB,QAAQ,0CAA0C;AAClF,SAASC,UAAU,QAAQ,0BAA0B;AACrD;AACA;AACA;AACA;AACA;AACAD,uBAAuB,CAACE,SAAS,CAACC,oBAAoB,GAAG,UAAUC,YAAY,EAAE;EAC7E,IAAI,CAAC,IAAI,CAACC,uBAAuB,EAAE;IAC/B,IAAI,CAACA,uBAAuB,GAAG,IAAIC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ACA;AACA;EACIC,YAAYA,CAAA,EAAG;IACX,OAAO,kCAAkC;EAC7C;EACA;AACJ;AACA;AACA;EACIC,aAAaA,CAAA,EAAG;IACZ,OAAO,mBAAmB;EAC9B;AACJ;AACA3E,gBAAgB,CAAC,kCAAkC,CAAC,GAAGS,gCAAgC","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}