Kaynağa Gözat

Updated builds.

Mr.doob 4 yıl önce
ebeveyn
işleme
fa9663a34f
3 değiştirilmiş dosya ile 31 ekleme ve 11 silme
  1. 13 5
      build/three.js
  2. 0 0
      build/three.min.js
  3. 18 6
      build/three.module.js

+ 13 - 5
build/three.js

@@ -11106,7 +11106,7 @@
 		function needsUpdate(geometry, index) {
 			var cachedAttributes = currentState.attributes;
 			var geometryAttributes = geometry.attributes;
-			if (Object.keys(cachedAttributes).length !== Object.keys(geometryAttributes).length) return true;
+			var attributesNum = 0;
 
 			for (var key in geometryAttributes) {
 				var cachedAttribute = cachedAttributes[key];
@@ -11114,8 +11114,10 @@
 				if (cachedAttribute === undefined) return true;
 				if (cachedAttribute.attribute !== geometryAttribute) return true;
 				if (cachedAttribute.data !== geometryAttribute.data) return true;
+				attributesNum++;
 			}
 
+			if (currentState.attributesNum !== attributesNum) return true;
 			if (currentState.index !== index) return true;
 			return false;
 		}
@@ -11123,6 +11125,7 @@
 		function saveCache(geometry, index) {
 			var cache = {};
 			var attributes = geometry.attributes;
+			var attributesNum = 0;
 
 			for (var key in attributes) {
 				var attribute = attributes[key];
@@ -11134,9 +11137,11 @@
 				}
 
 				cache[key] = data;
+				attributesNum++;
 			}
 
 			currentState.attributes = cache;
+			currentState.attributesNum = attributesNum;
 			currentState.index = index;
 		}
 
@@ -18327,7 +18332,7 @@
 					var bones = skeleton.bones;
 
 					if (capabilities.floatVertexTextures) {
-						if (skeleton.boneTexture === undefined) {
+						if (skeleton.boneTexture === null) {
 							// layout (1 matrix = 4 pixels)
 							//			RGBA RGBA RGBA RGBA (=> column1, column2, column3, column4)
 							//	with	8x8	pixel texture max	 16 bones * 4 pixels =	(8 * 8)
@@ -19435,6 +19440,9 @@
 		this.uuid = MathUtils.generateUUID();
 		this.bones = bones.slice(0);
 		this.boneInverses = boneInverses;
+		this.boneMatrices = null;
+		this.boneTexture = null;
+		this.boneTextureSize = 0;
 		this.frame = -1;
 		this.init();
 	}
@@ -19514,7 +19522,7 @@
 				_offsetMatrix.toArray(boneMatrices, i * 16);
 			}
 
-			if (boneTexture !== undefined) {
+			if (boneTexture !== null) {
 				boneTexture.needsUpdate = true;
 			}
 		},
@@ -19533,9 +19541,9 @@
 			return undefined;
 		},
 		dispose: function dispose() {
-			if (this.boneTexture) {
+			if (this.boneTexture !== null) {
 				this.boneTexture.dispose();
-				this.boneTexture = undefined;
+				this.boneTexture = null;
 			}
 		},
 		fromJSON: function fromJSON(json, bones) {

Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 0
build/three.min.js


+ 18 - 6
build/three.module.js

@@ -12763,7 +12763,7 @@ function WebGLAttributes( gl, capabilities ) {
 
 		if ( attribute.isGLBufferAttribute ) {
 
-			var cached = buffers.get( attribute );
+			const cached = buffers.get( attribute );
 
 			if ( ! cached || cached.version < attribute.version ) {
 
@@ -14189,7 +14189,7 @@ function WebGLBindingStates( gl, extensions, attributes, capabilities ) {
 		const cachedAttributes = currentState.attributes;
 		const geometryAttributes = geometry.attributes;
 
-		if ( Object.keys( cachedAttributes ).length !== Object.keys( geometryAttributes ).length ) return true;
+		let attributesNum = 0;
 
 		for ( const key in geometryAttributes ) {
 
@@ -14202,8 +14202,12 @@ function WebGLBindingStates( gl, extensions, attributes, capabilities ) {
 
 			if ( cachedAttribute.data !== geometryAttribute.data ) return true;
 
+			attributesNum ++;
+
 		}
 
+		if ( currentState.attributesNum !== attributesNum ) return true;
+
 		if ( currentState.index !== index ) return true;
 
 		return false;
@@ -14214,6 +14218,7 @@ function WebGLBindingStates( gl, extensions, attributes, capabilities ) {
 
 		const cache = {};
 		const attributes = geometry.attributes;
+		let attributesNum = 0;
 
 		for ( const key in attributes ) {
 
@@ -14230,9 +14235,12 @@ function WebGLBindingStates( gl, extensions, attributes, capabilities ) {
 
 			cache[ key ] = data;
 
+			attributesNum ++;
+
 		}
 
 		currentState.attributes = cache;
+		currentState.attributesNum = attributesNum;
 
 		currentState.index = index;
 
@@ -24687,7 +24695,7 @@ function WebGLRenderer( parameters ) {
 
 				if ( capabilities.floatVertexTextures ) {
 
-					if ( skeleton.boneTexture === undefined ) {
+					if ( skeleton.boneTexture === null ) {
 
 						// layout (1 matrix = 4 pixels)
 						//      RGBA RGBA RGBA RGBA (=> column1, column2, column3, column4)
@@ -26229,6 +26237,10 @@ function Skeleton( bones = [], boneInverses = [] ) {
 
 	this.bones = bones.slice( 0 );
 	this.boneInverses = boneInverses;
+	this.boneMatrices = null;
+
+	this.boneTexture = null;
+	this.boneTextureSize = 0;
 
 	this.frame = - 1;
 
@@ -26356,7 +26368,7 @@ Object.assign( Skeleton.prototype, {
 
 		}
 
-		if ( boneTexture !== undefined ) {
+		if ( boneTexture !== null ) {
 
 			boneTexture.needsUpdate = true;
 
@@ -26390,11 +26402,11 @@ Object.assign( Skeleton.prototype, {
 
 	dispose: function ( ) {
 
-		if ( this.boneTexture ) {
+		if ( this.boneTexture !== null ) {
 
 			this.boneTexture.dispose();
 
-			this.boneTexture = undefined;
+			this.boneTexture = null;
 
 		}
 

Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor