瀏覽代碼

Updated builds.

Mr.doob 2 年之前
父節點
當前提交
1d5dc7031f
共有 5 個文件被更改,包括 42 次插入90 次删除
  1. 14 30
      build/three.cjs
  2. 14 30
      build/three.js
  3. 0 0
      build/three.min.js
  4. 14 30
      build/three.module.js
  5. 0 0
      build/three.module.min.js

+ 14 - 30
build/three.cjs

@@ -26222,8 +26222,6 @@ class WebXRManager extends EventDispatcher {
 
 		//
 
-		let userCamera = null;
-
 		const cameraL = new PerspectiveCamera();
 		cameraL.layers.enable( 1 );
 		cameraL.viewport = new Vector4();
@@ -26243,19 +26241,11 @@ class WebXRManager extends EventDispatcher {
 
 		//
 
-		this.cameraAutoUpdate = true; // @deprecated, r153
+		this.cameraAutoUpdate = true;
 		this.enabled = false;
 
 		this.isPresenting = false;
 
-		this.getCamera = function () {}; // @deprecated, r153
-
-		this.setUserCamera = function ( value ) {
-
-			userCamera = value;
-
-		};
-
 		this.getController = function ( index ) {
 
 			let controller = controllers[ index ];
@@ -26692,15 +26682,9 @@ class WebXRManager extends EventDispatcher {
 
 		}
 
-		this.updateCameraXR = function ( camera ) {
+		this.updateCamera = function ( camera ) {
 
-			if ( session === null ) return camera;
-
-			if ( userCamera ) {
-
-				camera = userCamera;
-
-			}
+			if ( session === null ) return;
 
 			cameraXR.near = cameraR.near = cameraL.near = camera.near;
 			cameraXR.far = cameraR.far = cameraL.far = camera.far;
@@ -26746,19 +26730,11 @@ class WebXRManager extends EventDispatcher {
 
 			// update user camera and its children
 
-			if ( userCamera ) {
-
-				updateUserCamera( cameraXR, parent );
-
-			}
-
-			return cameraXR;
+			updateUserCamera( camera, cameraXR, parent );
 
 		};
 
-		function updateUserCamera( cameraXR, parent ) {
-
-			const camera = userCamera;
+		function updateUserCamera( camera, cameraXR, parent ) {
 
 			if ( parent === null ) {
 
@@ -26795,6 +26771,12 @@ class WebXRManager extends EventDispatcher {
 
 		}
 
+		this.getCamera = function () {
+
+			return cameraXR;
+
+		};
+
 		this.getFoveation = function () {
 
 			if ( glProjLayer === null && glBaseLayer === null ) {
@@ -28933,7 +28915,9 @@ class WebGLRenderer {
 
 			if ( xr.enabled === true && xr.isPresenting === true ) {
 
-				camera = xr.updateCameraXR( camera ); // use XR camera for rendering
+				if ( xr.cameraAutoUpdate === true ) xr.updateCamera( camera );
+
+				camera = xr.getCamera(); // use XR camera for rendering
 
 			}
 

+ 14 - 30
build/three.js

@@ -26227,8 +26227,6 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
 
 			//
 
-			let userCamera = null;
-
 			const cameraL = new PerspectiveCamera();
 			cameraL.layers.enable( 1 );
 			cameraL.viewport = new Vector4();
@@ -26248,19 +26246,11 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
 
 			//
 
-			this.cameraAutoUpdate = true; // @deprecated, r153
+			this.cameraAutoUpdate = true;
 			this.enabled = false;
 
 			this.isPresenting = false;
 
-			this.getCamera = function () {}; // @deprecated, r153
-
-			this.setUserCamera = function ( value ) {
-
-				userCamera = value;
-
-			};
-
 			this.getController = function ( index ) {
 
 				let controller = controllers[ index ];
@@ -26697,15 +26687,9 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
 
 			}
 
-			this.updateCameraXR = function ( camera ) {
+			this.updateCamera = function ( camera ) {
 
-				if ( session === null ) return camera;
-
-				if ( userCamera ) {
-
-					camera = userCamera;
-
-				}
+				if ( session === null ) return;
 
 				cameraXR.near = cameraR.near = cameraL.near = camera.near;
 				cameraXR.far = cameraR.far = cameraL.far = camera.far;
@@ -26751,19 +26735,11 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
 
 				// update user camera and its children
 
-				if ( userCamera ) {
-
-					updateUserCamera( cameraXR, parent );
-
-				}
-
-				return cameraXR;
+				updateUserCamera( camera, cameraXR, parent );
 
 			};
 
-			function updateUserCamera( cameraXR, parent ) {
-
-				const camera = userCamera;
+			function updateUserCamera( camera, cameraXR, parent ) {
 
 				if ( parent === null ) {
 
@@ -26800,6 +26776,12 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
 
 			}
 
+			this.getCamera = function () {
+
+				return cameraXR;
+
+			};
+
 			this.getFoveation = function () {
 
 				if ( glProjLayer === null && glBaseLayer === null ) {
@@ -28938,7 +28920,9 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
 
 				if ( xr.enabled === true && xr.isPresenting === true ) {
 
-					camera = xr.updateCameraXR( camera ); // use XR camera for rendering
+					if ( xr.cameraAutoUpdate === true ) xr.updateCamera( camera );
+
+					camera = xr.getCamera(); // use XR camera for rendering
 
 				}
 

文件差異過大導致無法顯示
+ 0 - 0
build/three.min.js


+ 14 - 30
build/three.module.js

@@ -26220,8 +26220,6 @@ class WebXRManager extends EventDispatcher {
 
 		//
 
-		let userCamera = null;
-
 		const cameraL = new PerspectiveCamera();
 		cameraL.layers.enable( 1 );
 		cameraL.viewport = new Vector4();
@@ -26241,19 +26239,11 @@ class WebXRManager extends EventDispatcher {
 
 		//
 
-		this.cameraAutoUpdate = true; // @deprecated, r153
+		this.cameraAutoUpdate = true;
 		this.enabled = false;
 
 		this.isPresenting = false;
 
-		this.getCamera = function () {}; // @deprecated, r153
-
-		this.setUserCamera = function ( value ) {
-
-			userCamera = value;
-
-		};
-
 		this.getController = function ( index ) {
 
 			let controller = controllers[ index ];
@@ -26690,15 +26680,9 @@ class WebXRManager extends EventDispatcher {
 
 		}
 
-		this.updateCameraXR = function ( camera ) {
+		this.updateCamera = function ( camera ) {
 
-			if ( session === null ) return camera;
-
-			if ( userCamera ) {
-
-				camera = userCamera;
-
-			}
+			if ( session === null ) return;
 
 			cameraXR.near = cameraR.near = cameraL.near = camera.near;
 			cameraXR.far = cameraR.far = cameraL.far = camera.far;
@@ -26744,19 +26728,11 @@ class WebXRManager extends EventDispatcher {
 
 			// update user camera and its children
 
-			if ( userCamera ) {
-
-				updateUserCamera( cameraXR, parent );
-
-			}
-
-			return cameraXR;
+			updateUserCamera( camera, cameraXR, parent );
 
 		};
 
-		function updateUserCamera( cameraXR, parent ) {
-
-			const camera = userCamera;
+		function updateUserCamera( camera, cameraXR, parent ) {
 
 			if ( parent === null ) {
 
@@ -26793,6 +26769,12 @@ class WebXRManager extends EventDispatcher {
 
 		}
 
+		this.getCamera = function () {
+
+			return cameraXR;
+
+		};
+
 		this.getFoveation = function () {
 
 			if ( glProjLayer === null && glBaseLayer === null ) {
@@ -28931,7 +28913,9 @@ class WebGLRenderer {
 
 			if ( xr.enabled === true && xr.isPresenting === true ) {
 
-				camera = xr.updateCameraXR( camera ); // use XR camera for rendering
+				if ( xr.cameraAutoUpdate === true ) xr.updateCamera( camera );
+
+				camera = xr.getCamera(); // use XR camera for rendering
 
 			}
 

文件差異過大導致無法顯示
+ 0 - 0
build/three.module.min.js


部分文件因文件數量過多而無法顯示