浏览代码

Updated builds.

Mr.doob 7 年之前
父节点
当前提交
71f608d9a3
共有 3 个文件被更改,包括 180 次插入162 次删除
  1. 17 8
      build/three.js
  2. 146 146
      build/three.min.js
  3. 17 8
      build/three.module.js

+ 17 - 8
build/three.js

@@ -21534,9 +21534,21 @@
 
 		};
 
-		this.submitFrame = function () {
+		this.submitFrame = function ( scene, camera ) {
 
-			if ( isPresenting() ) device.submitFrame();
+			if ( isPresenting() ) {
+
+				device.submitFrame();
+
+				if ( device.capabilities.hasExternalDisplay ) {
+
+					scope.enabled = false;
+					renderer.render( scene, camera );
+					scope.enabled = true;
+
+				}
+
+			}
 
 		};
 
@@ -21957,6 +21969,7 @@
 
 			// frustum
 
+			_camera = null,
 			_frustum = new Frustum(),
 
 			// clipping
@@ -22841,6 +22854,7 @@
 			_currentGeometryProgram.wireframe = false;
 			_currentMaterialId = - 1;
 			_currentCamera = null;
+			_camera = camera;
 
 			// update scene graph
 
@@ -22922,12 +22936,7 @@
 
 			} else {
 
-				// opaque pass (front-to-back order)
-
 				if ( opaqueObjects.length ) renderObjects( opaqueObjects, scene, camera );
-
-				// transparent pass (back-to-front order)
-
 				if ( transparentObjects.length ) renderObjects( transparentObjects, scene, camera );
 
 			}
@@ -22952,7 +22961,7 @@
 
 			if ( vr.enabled ) {
 
-				vr.submitFrame();
+				vr.submitFrame( scene, _camera );
 
 			}
 

文件差异内容过多而无法显示
+ 146 - 146
build/three.min.js


+ 17 - 8
build/three.module.js

@@ -21528,9 +21528,21 @@ function WebVRManager( renderer ) {
 
 	};
 
-	this.submitFrame = function () {
+	this.submitFrame = function ( scene, camera ) {
 
-		if ( isPresenting() ) device.submitFrame();
+		if ( isPresenting() ) {
+
+			device.submitFrame();
+
+			if ( device.capabilities.hasExternalDisplay ) {
+
+				scope.enabled = false;
+				renderer.render( scene, camera );
+				scope.enabled = true;
+
+			}
+
+		}
 
 	};
 
@@ -21951,6 +21963,7 @@ function WebGLRenderer( parameters ) {
 
 		// frustum
 
+		_camera = null,
 		_frustum = new Frustum(),
 
 		// clipping
@@ -22835,6 +22848,7 @@ function WebGLRenderer( parameters ) {
 		_currentGeometryProgram.wireframe = false;
 		_currentMaterialId = - 1;
 		_currentCamera = null;
+		_camera = camera;
 
 		// update scene graph
 
@@ -22916,12 +22930,7 @@ function WebGLRenderer( parameters ) {
 
 		} else {
 
-			// opaque pass (front-to-back order)
-
 			if ( opaqueObjects.length ) renderObjects( opaqueObjects, scene, camera );
-
-			// transparent pass (back-to-front order)
-
 			if ( transparentObjects.length ) renderObjects( transparentObjects, scene, camera );
 
 		}
@@ -22946,7 +22955,7 @@ function WebGLRenderer( parameters ) {
 
 		if ( vr.enabled ) {
 
-			vr.submitFrame();
+			vr.submitFrame( scene, _camera );
 
 		}
 

部分文件因为文件数量过多而无法显示