浏览代码

Updated builds.

Mr.doob 3 年之前
父节点
当前提交
663ff03e6c
共有 4 个文件被更改,包括 41 次插入5 次删除
  1. 11 2
      build/three.cjs
  2. 11 2
      build/three.js
  3. 0 0
      build/three.min.js
  4. 19 1
      build/three.module.js

+ 11 - 2
build/three.cjs

@@ -12835,7 +12835,7 @@ function absNumericalSort(a, b) {
 function denormalize(morph, attribute) {
 	let denominator = 1;
 	const array = attribute.isInterleavedBufferAttribute ? attribute.data.array : attribute.array;
-	if (array instanceof Int8Array) denominator = 127;else if (array instanceof Int16Array) denominator = 32767;else if (array instanceof Int32Array) denominator = 2147483647;else console.error('THREE.WebGLMorphtargets: Unsupported morph attribute data type: ', array);
+	if (array instanceof Int8Array) denominator = 127;else if (array instanceof Uint8Array) denominator = 255;else if (array instanceof Uint16Array) denominator = 65535;else if (array instanceof Int16Array) denominator = 32767;else if (array instanceof Int32Array) denominator = 2147483647;else console.error('THREE.WebGLMorphtargets: Unsupported morph attribute data type: ', array);
 	morph.divideScalar(denominator);
 }
 
@@ -20745,7 +20745,16 @@ function WebGLRenderer(parameters = {}) {
 	};
 
 	this.initTexture = function (texture) {
-		textures.setTexture2D(texture, 0);
+		if (texture.isCubeTexture) {
+			textures.setTextureCube(texture, 0);
+		} else if (texture.isData3DTexture) {
+			textures.setTexture3D(texture, 0);
+		} else if (texture.isDataArrayTexture) {
+			textures.setTexture2DArray(texture, 0);
+		} else {
+			textures.setTexture2D(texture, 0);
+		}
+
 		state.unbindTexture();
 	};
 

+ 11 - 2
build/three.js

@@ -12837,7 +12837,7 @@
 	function denormalize(morph, attribute) {
 		let denominator = 1;
 		const array = attribute.isInterleavedBufferAttribute ? attribute.data.array : attribute.array;
-		if (array instanceof Int8Array) denominator = 127;else if (array instanceof Int16Array) denominator = 32767;else if (array instanceof Int32Array) denominator = 2147483647;else console.error('THREE.WebGLMorphtargets: Unsupported morph attribute data type: ', array);
+		if (array instanceof Int8Array) denominator = 127;else if (array instanceof Uint8Array) denominator = 255;else if (array instanceof Uint16Array) denominator = 65535;else if (array instanceof Int16Array) denominator = 32767;else if (array instanceof Int32Array) denominator = 2147483647;else console.error('THREE.WebGLMorphtargets: Unsupported morph attribute data type: ', array);
 		morph.divideScalar(denominator);
 	}
 
@@ -20747,7 +20747,16 @@
 		};
 
 		this.initTexture = function (texture) {
-			textures.setTexture2D(texture, 0);
+			if (texture.isCubeTexture) {
+				textures.setTextureCube(texture, 0);
+			} else if (texture.isData3DTexture) {
+				textures.setTexture3D(texture, 0);
+			} else if (texture.isDataArrayTexture) {
+				textures.setTexture2DArray(texture, 0);
+			} else {
+				textures.setTexture2D(texture, 0);
+			}
+
 			state.unbindTexture();
 		};
 

文件差异内容过多而无法显示
+ 0 - 0
build/three.min.js


+ 19 - 1
build/three.module.js

@@ -16799,6 +16799,8 @@ function denormalize( morph, attribute ) {
 	const array = attribute.isInterleavedBufferAttribute ? attribute.data.array : attribute.array;
 
 	if ( array instanceof Int8Array ) denominator = 127;
+	else if ( array instanceof Uint8Array ) denominator = 255;
+	else if ( array instanceof Uint16Array ) denominator = 65535;
 	else if ( array instanceof Int16Array ) denominator = 32767;
 	else if ( array instanceof Int32Array ) denominator = 2147483647;
 	else console.error( 'THREE.WebGLMorphtargets: Unsupported morph attribute data type: ', array );
@@ -28392,7 +28394,23 @@ function WebGLRenderer( parameters = {} ) {
 
 	this.initTexture = function ( texture ) {
 
-		textures.setTexture2D( texture, 0 );
+		if ( texture.isCubeTexture ) {
+
+			textures.setTextureCube( texture, 0 );
+
+		} else if ( texture.isData3DTexture ) {
+
+			textures.setTexture3D( texture, 0 );
+
+		} else if ( texture.isDataArrayTexture ) {
+
+			textures.setTexture2DArray( texture, 0 );
+
+		} else {
+
+			textures.setTexture2D( texture, 0 );
+
+		}
 
 		state.unbindTexture();
 

部分文件因为文件数量过多而无法显示