Forráskód Böngészése

hide device orientation disable input flag as it is no longer desired

Trevor Baron 6 éve
szülő
commit
96753f7f8f

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

@@ -131,7 +131,7 @@
 - Added `MeshExploder` class ([danjpar](https://github.com/danjpar))
 - Observables can now make observers top or bottom priority ([TrevorDev](https://github.com/TrevorDev))
 - Mesh outline no longer is shown through the mesh when it's transparent ([TrevorDev](https://github.com/TrevorDev))
-- DeviceOrientationCamera will no longer be modified by mouse input if the orientation sensor is active ([TrevorDev](https://github.com/TrevorDev))
+- DeviceOrientationCamera will no longer be modified by mouse input when the orientation sensor is active ([TrevorDev](https://github.com/TrevorDev))
 - Added LoadScriptAsync tools helper function [MackeyK24](https://github.com/mackeyk24))
 - Added customShaderNameResolve to PBRMaterialBase to allow subclasses to specify custom shader information [MackeyK24](https://github.com/mackeyk24))
 - Added PBRCustomMaterial to material library to allow easy subclassing of PBR materials [MackeyK24](https://github.com/mackeyk24))

+ 3 - 2
src/Cameras/deviceOrientationCamera.ts

@@ -34,7 +34,7 @@ export class DeviceOrientationCamera extends FreeCamera {
         // When the orientation sensor fires it's first event, disable mouse input
         if (this.inputs._deviceOrientationInput) {
             this.inputs._deviceOrientationInput._onDeviceOrientationChangedObservable.addOnce(() => {
-                if (this.disablePointerInputWhenUsingDeviceOrientation) {
+                if (this._disablePointerInputWhenUsingDeviceOrientation) {
                     if (this.inputs._mouseInput) {
                         this.inputs._mouseInput._allowCameraRotation = false;
                         this.inputs._mouseInput.onPointerMovedObservable.add((e) => {
@@ -54,9 +54,10 @@ export class DeviceOrientationCamera extends FreeCamera {
     }
 
     /**
+     * @hidden
      * Disabled pointer input on first orientation sensor update (Default: true)
      */
-    public disablePointerInputWhenUsingDeviceOrientation = true;
+    public _disablePointerInputWhenUsingDeviceOrientation = true;
     private _dragFactor = 0;
     /**
      * Enabled turning on the y axis when the orientation sensor is active