Mugen87 před 3 roky
rodič
revize
3843183c54
3 změnil soubory, kde provedl 18 přidání a 11 odebrání
  1. 11 7
      build/three.js
  2. 0 0
      build/three.min.js
  3. 7 4
      build/three.module.js

+ 11 - 7
build/three.js

@@ -7,7 +7,7 @@
 	typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
 	typeof define === 'function' && define.amd ? define(['exports'], factory) :
 	(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.THREE = {}));
-})(this, (function (exports) { 'use strict';
+}(this, (function (exports) { 'use strict';
 
 	const REVISION = '137dev';
 	const MOUSE = {
@@ -9085,7 +9085,6 @@
 			this.texture.isRenderTargetTexture = true;
 			this.texture.generateMipmaps = options.generateMipmaps !== undefined ? options.generateMipmaps : false;
 			this.texture.minFilter = options.minFilter !== undefined ? options.minFilter : LinearFilter;
-			this.texture._needsFlipEnvMap = false;
 		}
 
 		fromEquirectangularTexture(renderer, texture) {
@@ -11784,6 +11783,8 @@
 				if (this._cubemapShader == null) {
 					this._cubemapShader = _getCubemapShader();
 				}
+
+				this._cubemapShader.uniforms.flipEnvMap.value = texture.isRenderTargetTexture === false ? -1 : 1;
 			} else {
 				if (this._equirectShader == null) {
 					this._equirectShader = _getEquirectShader();
@@ -12140,6 +12141,9 @@
 			uniforms: {
 				'envMap': {
 					value: null
+				},
+				'flipEnvMap': {
+					value: -1
 				}
 			},
 			vertexShader: _getCommonVertexShader(),
@@ -12150,13 +12154,15 @@
 			precision mediump float;
 			precision mediump int;
 
+			uniform float flipEnvMap;
+
 			varying vec3 vOutputDirection;
 
 			uniform samplerCube envMap;
 
 			void main() {
 
-				gl_FragColor = textureCube( envMap, vec3( - vOutputDirection.x, vOutputDirection.yz ) );
+				gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );
 
 			}
 		`,
@@ -24539,9 +24545,7 @@
 
 
 	function isValidDiagonal(a, b) {
-		return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) && ( // dones't intersect other edges
-		locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b) && ( // locally visible
-		area(a.prev, a, b.prev) || area(a, b.prev, b)) || // does not create opposite-facing sectors
+		return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) && (locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b) && (area(a.prev, a, b.prev) || area(a, b.prev, b)) || // does not create opposite-facing sectors
 		equals(a, b) && area(a.prev, a, a.next) > 0 && area(b.prev, b, b.next) > 0); // special zero-length case
 	} // signed area of a triangle
 
@@ -36700,4 +36704,4 @@
 
 	Object.defineProperty(exports, '__esModule', { value: true });
 
-}));
+})));

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 0 - 0
build/three.min.js


+ 7 - 4
build/three.module.js

@@ -11935,8 +11935,6 @@ class WebGLCubeRenderTarget extends WebGLRenderTarget {
 		this.texture.generateMipmaps = options.generateMipmaps !== undefined ? options.generateMipmaps : false;
 		this.texture.minFilter = options.minFilter !== undefined ? options.minFilter : LinearFilter;
 
-		this.texture._needsFlipEnvMap = false;
-
 	}
 
 	fromEquirectangularTexture( renderer, texture ) {
@@ -15373,6 +15371,8 @@ class PMREMGenerator {
 
 			}
 
+			this._cubemapShader.uniforms.flipEnvMap.value = ( texture.isRenderTargetTexture === false ) ? - 1 : 1;
+
 		} else {
 
 			if ( this._equirectShader == null ) {
@@ -15794,7 +15794,8 @@ function _getCubemapShader() {
 		name: 'CubemapToCubeUV',
 
 		uniforms: {
-			'envMap': { value: null }
+			'envMap': { value: null },
+			'flipEnvMap': { value: - 1 }
 		},
 
 		vertexShader: _getCommonVertexShader(),
@@ -15804,13 +15805,15 @@ function _getCubemapShader() {
 			precision mediump float;
 			precision mediump int;
 
+			uniform float flipEnvMap;
+
 			varying vec3 vOutputDirection;
 
 			uniform samplerCube envMap;
 
 			void main() {
 
-				gl_FragColor = textureCube( envMap, vec3( - vOutputDirection.x, vOutputDirection.yz ) );
+				gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );
 
 			}
 		`,

Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů