瀏覽代碼

r138 (bis) (bis) (bis)

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

+ 4 - 9
build/three.cjs

@@ -1869,6 +1869,7 @@ class Texture extends EventDispatcher {
 		this.unpackAlignment = source.unpackAlignment;
 		this.encoding = source.encoding;
 		this.userData = JSON.parse(JSON.stringify(source.userData));
+		this.needsUpdate = true;
 		return this;
 	}
 
@@ -2635,6 +2636,7 @@ class WebGLMultipleRenderTargets extends WebGLRenderTarget {
 
 		for (let i = 0; i < count; i++) {
 			this.texture[i] = texture.clone();
+			this.texture[i].isRenderTargetTexture = true;
 		}
 	}
 
@@ -16801,7 +16803,7 @@ function WebGLTextures(_gl, extensions, state, properties, capabilities, utils,
 		const textureProperties = properties.get(texture);
 		if (texture.isVideoTexture) updateVideoTexture(texture);
 
-		if (texture.version > 0 && textureProperties.__version !== texture.version) {
+		if (texture.isRenderTargetTexture === false && texture.version > 0 && textureProperties.__version !== texture.version) {
 			const image = texture.image;
 
 			if (image === null) {
@@ -20342,12 +20344,6 @@ function WebGLRenderer(parameters = {}) {
 		uniforms.spotLightShadows.needsUpdate = value;
 		uniforms.rectAreaLights.needsUpdate = value;
 		uniforms.hemisphereLights.needsUpdate = value;
-		uniforms.directionalShadowMap.needsUpdate = value;
-		uniforms.directionalShadowMatrix.needsUpdate = value;
-		uniforms.spotShadowMap.needsUpdate = value;
-		uniforms.spotShadowMatrix.needsUpdate = value;
-		uniforms.pointShadowMap.needsUpdate = value;
-		uniforms.pointShadowMatrix.needsUpdate = value;
 	}
 
 	function materialNeedsLights(material) {
@@ -20380,8 +20376,7 @@ function WebGLRenderer(parameters = {}) {
 				// are midframe flushes and an external depth buffer. Disable use of the extension.
 				if (extensions.has('WEBGL_multisampled_render_to_texture') === true) {
 					console.warn('THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided');
-					renderTarget.useRenderToTexture = false;
-					renderTarget.useRenderbuffer = true;
+					renderTargetProperties.__useRenderToTexture = false;
 				}
 			}
 		}

+ 4 - 9
build/three.js

@@ -1871,6 +1871,7 @@
 			this.unpackAlignment = source.unpackAlignment;
 			this.encoding = source.encoding;
 			this.userData = JSON.parse(JSON.stringify(source.userData));
+			this.needsUpdate = true;
 			return this;
 		}
 
@@ -2637,6 +2638,7 @@
 
 			for (let i = 0; i < count; i++) {
 				this.texture[i] = texture.clone();
+				this.texture[i].isRenderTargetTexture = true;
 			}
 		}
 
@@ -16803,7 +16805,7 @@
 			const textureProperties = properties.get(texture);
 			if (texture.isVideoTexture) updateVideoTexture(texture);
 
-			if (texture.version > 0 && textureProperties.__version !== texture.version) {
+			if (texture.isRenderTargetTexture === false && texture.version > 0 && textureProperties.__version !== texture.version) {
 				const image = texture.image;
 
 				if (image === null) {
@@ -20344,12 +20346,6 @@
 			uniforms.spotLightShadows.needsUpdate = value;
 			uniforms.rectAreaLights.needsUpdate = value;
 			uniforms.hemisphereLights.needsUpdate = value;
-			uniforms.directionalShadowMap.needsUpdate = value;
-			uniforms.directionalShadowMatrix.needsUpdate = value;
-			uniforms.spotShadowMap.needsUpdate = value;
-			uniforms.spotShadowMatrix.needsUpdate = value;
-			uniforms.pointShadowMap.needsUpdate = value;
-			uniforms.pointShadowMatrix.needsUpdate = value;
 		}
 
 		function materialNeedsLights(material) {
@@ -20382,8 +20378,7 @@
 					// are midframe flushes and an external depth buffer. Disable use of the extension.
 					if (extensions.has('WEBGL_multisampled_render_to_texture') === true) {
 						console.warn('THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided');
-						renderTarget.useRenderToTexture = false;
-						renderTarget.useRenderbuffer = true;
+						renderTargetProperties.__useRenderToTexture = false;
 					}
 				}
 			}

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


+ 5 - 10
build/three.module.js

@@ -2312,6 +2312,8 @@ class Texture extends EventDispatcher {
 
 		this.userData = JSON.parse( JSON.stringify( source.userData ) );
 
+		this.needsUpdate = true;
+
 		return this;
 
 	}
@@ -3345,6 +3347,7 @@ class WebGLMultipleRenderTargets extends WebGLRenderTarget {
 		for ( let i = 0; i < count; i ++ ) {
 
 			this.texture[ i ] = texture.clone();
+			this.texture[ i ].isRenderTargetTexture = true;
 
 		}
 
@@ -22607,7 +22610,7 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
 
 		if ( texture.isVideoTexture ) updateVideoTexture( texture );
 
-		if ( texture.version > 0 && textureProperties.__version !== texture.version ) {
+		if ( texture.isRenderTargetTexture === false && texture.version > 0 && textureProperties.__version !== texture.version ) {
 
 			const image = texture.image;
 
@@ -27788,13 +27791,6 @@ function WebGLRenderer( parameters = {} ) {
 		uniforms.rectAreaLights.needsUpdate = value;
 		uniforms.hemisphereLights.needsUpdate = value;
 
-		uniforms.directionalShadowMap.needsUpdate = value;
-		uniforms.directionalShadowMatrix.needsUpdate = value;
-		uniforms.spotShadowMap.needsUpdate = value;
-		uniforms.spotShadowMatrix.needsUpdate = value;
-		uniforms.pointShadowMap.needsUpdate = value;
-		uniforms.pointShadowMatrix.needsUpdate = value;
-
 	}
 
 	function materialNeedsLights( material ) {
@@ -27842,8 +27838,7 @@ function WebGLRenderer( parameters = {} ) {
 				if ( extensions.has( 'WEBGL_multisampled_render_to_texture' ) === true ) {
 
 					console.warn( 'THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided' );
-					renderTarget.useRenderToTexture = false;
-					renderTarget.useRenderbuffer = true;
+					renderTargetProperties.__useRenderToTexture = false;
 
 				}
 

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "three",
-  "version": "0.138.2",
+  "version": "0.138.3",
   "description": "JavaScript 3D library",
   "type": "module",
   "main": "./build/three.js",

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