Trevor Baron 6 tahun lalu
induk
melakukan
c4dd7bf8de
1 mengubah file dengan 3 tambahan dan 3 penghapusan
  1. 3 3
      src/Cameras/VR/vrExperienceHelper.ts

+ 3 - 3
src/Cameras/VR/vrExperienceHelper.ts

@@ -822,10 +822,10 @@ export class VRExperienceHelper {
         // Allow clicking in the vrDeviceOrientationCamera
         scene.onPointerObservable.add((e) => {
             if (this._interactionsEnabled) {
-                if (scene.activeCamera == this.vrDeviceOrientationCamera && (e.event as PointerEvent).pointerType == "mouse") {
-                    if (e.type == PointerEventTypes.POINTERDOWN) {
+                if (scene.activeCamera === this.vrDeviceOrientationCamera && (e.event as PointerEvent).pointerType === "mouse") {
+                    if (e.type === PointerEventTypes.POINTERDOWN) {
                         this._cameraGazer._selectionPointerDown();
-                    }else if (e.type == PointerEventTypes.POINTERUP) {
+                    }else if (e.type === PointerEventTypes.POINTERUP) {
                         this._cameraGazer._selectionPointerUp();
                     }
                 }