Mr.doob преди 3 години
родител
ревизия
45bfa518b1
променени са 4 файла, в които са добавени 13 реда и са изтрити 28 реда
  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

+ 4 - 9
build/three.cjs

@@ -1871,6 +1871,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;
 	}
 
@@ -2638,6 +2639,7 @@ class WebGLMultipleRenderTargets extends WebGLRenderTarget {
 
 		for (let i = 0; i < count; i++) {
 			this.texture[i] = texture.clone();
+			this.texture[i].isRenderTargetTexture = true;
 		}
 	}
 
@@ -16811,7 +16813,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) {
@@ -20354,12 +20356,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) {
@@ -20392,8 +20388,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

@@ -1873,6 +1873,7 @@
 			this.unpackAlignment = source.unpackAlignment;
 			this.encoding = source.encoding;
 			this.userData = JSON.parse(JSON.stringify(source.userData));
+			this.needsUpdate = true;
 			return this;
 		}
 
@@ -2640,6 +2641,7 @@
 
 			for (let i = 0; i < count; i++) {
 				this.texture[i] = texture.clone();
+				this.texture[i].isRenderTargetTexture = true;
 			}
 		}
 
@@ -16813,7 +16815,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) {
@@ -20356,12 +20358,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) {
@@ -20394,8 +20390,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

@@ -2316,6 +2316,8 @@ class Texture extends EventDispatcher {
 
 		this.userData = JSON.parse( JSON.stringify( source.userData ) );
 
+		this.needsUpdate = true;
+
 		return this;
 
 	}
@@ -3350,6 +3352,7 @@ class WebGLMultipleRenderTargets extends WebGLRenderTarget {
 		for ( let i = 0; i < count; i ++ ) {
 
 			this.texture[ i ] = texture.clone();
+			this.texture[ i ].isRenderTargetTexture = true;
 
 		}
 
@@ -22620,7 +22623,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;
 
@@ -27805,13 +27808,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 ) {
@@ -27859,8 +27855,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;
 
 				}
 

Някои файлове не бяха показани, защото твърде много файлове са промени