Bladeren bron

Updated builds.

Mr.doob 4 jaren geleden
bovenliggende
commit
9ca4b6f32b
3 gewijzigde bestanden met toevoegingen van 23 en 5 verwijderingen
  1. 11 3
      build/three.js
  2. 0 0
      build/three.min.js
  3. 12 2
      build/three.module.js

+ 11 - 3
build/three.js

@@ -5313,7 +5313,7 @@
 
 			return this;
 		},
-		removeAll: function removeAll() {
+		clear: function clear() {
 			for (var i = 0; i < this.children.length; i++) {
 				var object = this.children[i];
 				object.parent = null;
@@ -9496,7 +9496,15 @@
 		mapping = mapping !== undefined ? mapping : CubeReflectionMapping;
 		format = format !== undefined ? format : RGBFormat;
 		Texture.call(this, images, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, encoding);
-		this.flipY = false;
+		this.flipY = false; // Why CubeTexture._needsFlipEnvMap is necessary:
+		//
+		// By convention -- likely based on the RenderMan spec from the 1990's -- cube maps are specified by WebGL (and three.js)
+		// in a coordinate system in which positive-x is to the right when looking up the positive-z axis -- in other words,
+		// in a left-handed coordinate system. By continuing this convention, preexisting cube maps continued to render correctly.
+		// three.js uses a right-handed coordinate system. So environment maps used in three.js appear to have px and nx swapped
+		// and the flag _needsFlipEnvMap controls this conversion. The flip is not required (and thus _needsFlipEnvMap is set to false)
+		// when using WebGLCubeRenderTarget.texture as a cube texture.
+
 		this._needsFlipEnvMap = true;
 	}
 
@@ -11714,7 +11722,7 @@
 				wireframeAttributes.delete(buffergeometry);
 			}
 
-			bindingStates.releaseStatesOfGeometry(geometry);
+			bindingStates.releaseStatesOfGeometry(buffergeometry);
 
 			if (geometry.isInstancedBufferGeometry === true) {
 				delete geometry._maxInstanceCount;

File diff suppressed because it is too large
+ 0 - 0
build/three.min.js


+ 12 - 2
build/three.module.js

@@ -6647,7 +6647,7 @@ Object3D.prototype = Object.assign( Object.create( EventDispatcher.prototype ),
 
 	},
 
-	removeAll: function () {
+	clear: function () {
 
 		for ( let i = 0; i < this.children.length; i ++ ) {
 
@@ -12226,6 +12226,16 @@ function CubeTexture( images, mapping, wrapS, wrapT, magFilter, minFilter, forma
 
 	this.flipY = false;
 
+	// Why CubeTexture._needsFlipEnvMap is necessary:
+	//
+	// By convention -- likely based on the RenderMan spec from the 1990's -- cube maps are specified by WebGL (and three.js)
+	// in a coordinate system in which positive-x is to the right when looking up the positive-z axis -- in other words,
+	// in a left-handed coordinate system. By continuing this convention, preexisting cube maps continued to render correctly.
+
+	// three.js uses a right-handed coordinate system. So environment maps used in three.js appear to have px and nx swapped
+	// and the flag _needsFlipEnvMap controls this conversion. The flip is not required (and thus _needsFlipEnvMap is set to false)
+	// when using WebGLCubeRenderTarget.texture as a cube texture.
+
 	this._needsFlipEnvMap = true;
 
 }
@@ -15102,7 +15112,7 @@ function WebGLGeometries( gl, attributes, info, bindingStates ) {
 
 		}
 
-		bindingStates.releaseStatesOfGeometry( geometry );
+		bindingStates.releaseStatesOfGeometry( buffergeometry );
 
 		if ( geometry.isInstancedBufferGeometry === true ) {
 

Some files were not shown because too many files changed in this diff