Parcourir la source

renaming functions

Raanan Weber il y a 5 ans
Parent
commit
9b7bc3ab0a
2 fichiers modifiés avec 4 ajouts et 4 suppressions
  1. 2 2
      src/Cameras/XR/webXRCamera.ts
  2. 2 2
      src/Cameras/XR/webXRExperienceHelper.ts

+ 2 - 2
src/Cameras/XR/webXRCamera.ts

@@ -94,13 +94,13 @@ export class WebXRCamera extends FreeCamera {
             this.position.subtractToRef(this._referencedPosition, this._referencedPosition);
             this._referenceQuaternion.conjugateInPlace();
             this._referenceQuaternion.multiplyToRef(this.rotationQuaternion, this._referenceQuaternion);
-            this.updateReferenceSpaceOffset(this._referencedPosition, this._referenceQuaternion.normalize());
+            this._updateReferenceSpaceOffset(this._referencedPosition, this._referenceQuaternion.normalize());
             return true;
         }
         return false;
     }
 
-    public updateReferenceSpaceOffset(positionOffset: Vector3, rotationOffset?: Quaternion, ignoreHeight: boolean = false) {
+    private _updateReferenceSpaceOffset(positionOffset: Vector3, rotationOffset?: Quaternion, ignoreHeight: boolean = false) {
         if (!this._xrSessionManager.referenceSpace || !this._xrSessionManager.currentFrame) {
             return;
         }

+ 2 - 2
src/Cameras/XR/webXRExperienceHelper.ts

@@ -122,7 +122,7 @@ export class WebXRExperienceHelper implements IDisposable {
             // Overwrite current scene settings
             this.scene.autoClear = false;
 
-            this.nonVrToVrCamera();
+            this._nonXRToXRCamera();
 
             this.sessionManager.onXRSessionEnded.addOnce(() => {
                 // Reset camera rigs output render target to ensure sessions render target is not drawn after it ends
@@ -164,7 +164,7 @@ export class WebXRExperienceHelper implements IDisposable {
         this.sessionManager.dispose();
     }
 
-    private nonVrToVrCamera() {
+    private _nonXRToXRCamera() {
         this.scene.activeCamera = this.camera;
         const mat = this._nonVRCamera!.computeWorldMatrix();
         mat.decompose(undefined, this.camera.rotationQuaternion, this.camera.position);