瀏覽代碼

Updated builds.

Mr.doob 3 年之前
父節點
當前提交
05455832f2
共有 4 個文件被更改,包括 35 次插入34 次删除
  1. 11 11
      build/three.cjs
  2. 11 11
      build/three.js
  3. 0 0
      build/three.min.js
  4. 13 12
      build/three.module.js

+ 11 - 11
build/three.cjs

@@ -19551,11 +19551,11 @@ function WebGLRenderer(parameters = {}) {
 		background.setClearAlpha.apply(background, arguments);
 	};
 
-	this.clear = function (color, depth, stencil) {
+	this.clear = function (color = true, depth = true, stencil = true) {
 		let bits = 0;
-		if (color === undefined || color) bits |= _gl.COLOR_BUFFER_BIT;
-		if (depth === undefined || depth) bits |= _gl.DEPTH_BUFFER_BIT;
-		if (stencil === undefined || stencil) bits |= _gl.STENCIL_BUFFER_BIT;
+		if (color) bits |= _gl.COLOR_BUFFER_BIT;
+		if (depth) bits |= _gl.DEPTH_BUFFER_BIT;
+		if (stencil) bits |= _gl.STENCIL_BUFFER_BIT;
 
 		_gl.clear(bits);
 	};
@@ -19864,12 +19864,7 @@ function WebGLRenderer(parameters = {}) {
 		} //
 
 
-		if (scene.isScene === true) scene.onAfterRender(_this, scene, camera); // Ensure depth buffer writing is enabled so it can be cleared on next render
-
-		state.buffers.depth.setTest(true);
-		state.buffers.depth.setMask(true);
-		state.buffers.color.setMask(true);
-		state.setPolygonOffset(false); // _gl.finish();
+		if (scene.isScene === true) scene.onAfterRender(_this, scene, camera); // _gl.finish();
 
 		bindingStates.resetDefaultState();
 		_currentMaterialId = -1;
@@ -19970,7 +19965,12 @@ function WebGLRenderer(parameters = {}) {
 		if (viewport) state.viewport(_currentViewport.copy(viewport));
 		if (opaqueObjects.length > 0) renderObjects(opaqueObjects, scene, camera);
 		if (transmissiveObjects.length > 0) renderObjects(transmissiveObjects, scene, camera);
-		if (transparentObjects.length > 0) renderObjects(transparentObjects, scene, camera);
+		if (transparentObjects.length > 0) renderObjects(transparentObjects, scene, camera); // Ensure depth buffer writing is enabled so it can be cleared on next render
+
+		state.buffers.depth.setTest(true);
+		state.buffers.depth.setMask(true);
+		state.buffers.color.setMask(true);
+		state.setPolygonOffset(false);
 	}
 
 	function renderTransmissionPass(opaqueObjects, scene, camera) {

+ 11 - 11
build/three.js

@@ -19553,11 +19553,11 @@
 			background.setClearAlpha.apply(background, arguments);
 		};
 
-		this.clear = function (color, depth, stencil) {
+		this.clear = function (color = true, depth = true, stencil = true) {
 			let bits = 0;
-			if (color === undefined || color) bits |= _gl.COLOR_BUFFER_BIT;
-			if (depth === undefined || depth) bits |= _gl.DEPTH_BUFFER_BIT;
-			if (stencil === undefined || stencil) bits |= _gl.STENCIL_BUFFER_BIT;
+			if (color) bits |= _gl.COLOR_BUFFER_BIT;
+			if (depth) bits |= _gl.DEPTH_BUFFER_BIT;
+			if (stencil) bits |= _gl.STENCIL_BUFFER_BIT;
 
 			_gl.clear(bits);
 		};
@@ -19866,12 +19866,7 @@
 			} //
 
 
-			if (scene.isScene === true) scene.onAfterRender(_this, scene, camera); // Ensure depth buffer writing is enabled so it can be cleared on next render
-
-			state.buffers.depth.setTest(true);
-			state.buffers.depth.setMask(true);
-			state.buffers.color.setMask(true);
-			state.setPolygonOffset(false); // _gl.finish();
+			if (scene.isScene === true) scene.onAfterRender(_this, scene, camera); // _gl.finish();
 
 			bindingStates.resetDefaultState();
 			_currentMaterialId = -1;
@@ -19972,7 +19967,12 @@
 			if (viewport) state.viewport(_currentViewport.copy(viewport));
 			if (opaqueObjects.length > 0) renderObjects(opaqueObjects, scene, camera);
 			if (transmissiveObjects.length > 0) renderObjects(transmissiveObjects, scene, camera);
-			if (transparentObjects.length > 0) renderObjects(transparentObjects, scene, camera);
+			if (transparentObjects.length > 0) renderObjects(transparentObjects, scene, camera); // Ensure depth buffer writing is enabled so it can be cleared on next render
+
+			state.buffers.depth.setTest(true);
+			state.buffers.depth.setMask(true);
+			state.buffers.color.setMask(true);
+			state.setPolygonOffset(false);
 		}
 
 		function renderTransmissionPass(opaqueObjects, scene, camera) {

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


+ 13 - 12
build/three.module.js

@@ -26559,13 +26559,13 @@ function WebGLRenderer( parameters = {} ) {
 
 	};
 
-	this.clear = function ( color, depth, stencil ) {
+	this.clear = function ( color = true, depth = true, stencil = true ) {
 
 		let bits = 0;
 
-		if ( color === undefined || color ) bits |= 16384;
-		if ( depth === undefined || depth ) bits |= 256;
-		if ( stencil === undefined || stencil ) bits |= 1024;
+		if ( color ) bits |= 16384;
+		if ( depth ) bits |= 256;
+		if ( stencil ) bits |= 1024;
 
 		_gl.clear( bits );
 
@@ -27047,14 +27047,6 @@ function WebGLRenderer( parameters = {} ) {
 
 		if ( scene.isScene === true ) scene.onAfterRender( _this, scene, camera );
 
-		// Ensure depth buffer writing is enabled so it can be cleared on next render
-
-		state.buffers.depth.setTest( true );
-		state.buffers.depth.setMask( true );
-		state.buffers.color.setMask( true );
-
-		state.setPolygonOffset( false );
-
 		// _gl.finish();
 
 		bindingStates.resetDefaultState();
@@ -27217,6 +27209,14 @@ function WebGLRenderer( parameters = {} ) {
 		if ( transmissiveObjects.length > 0 ) renderObjects( transmissiveObjects, scene, camera );
 		if ( transparentObjects.length > 0 ) renderObjects( transparentObjects, scene, camera );
 
+		// Ensure depth buffer writing is enabled so it can be cleared on next render
+
+		state.buffers.depth.setTest( true );
+		state.buffers.depth.setMask( true );
+		state.buffers.color.setMask( true );
+
+		state.setPolygonOffset( false );
+
 	}
 
 	function renderTransmissionPass( opaqueObjects, scene, camera ) {
@@ -27858,6 +27858,7 @@ function WebGLRenderer( parameters = {} ) {
 		_currentRenderTarget = renderTarget;
 		_currentActiveCubeFace = activeCubeFace;
 		_currentActiveMipmapLevel = activeMipmapLevel;
+
 		let useDefaultFramebuffer = true;
 
 		if ( renderTarget ) {

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