Parcourir la source

Updated builds.

Mr.doob il y a 3 ans
Parent
commit
d25d8b0751
3 fichiers modifiés avec 96 ajouts et 70 suppressions
  1. 42 31
      build/three.js
  2. 0 0
      build/three.min.js
  3. 54 39
      build/three.module.js

+ 42 - 31
build/three.js

@@ -1072,6 +1072,37 @@
 
 
 	Matrix3.prototype.isMatrix3 = true;
 	Matrix3.prototype.isMatrix3 = true;
 
 
+	function arrayMax(array) {
+		if (array.length === 0) return -Infinity;
+		let max = array[0];
+
+		for (let i = 1, l = array.length; i < l; ++i) {
+			if (array[i] > max) max = array[i];
+		}
+
+		return max;
+	}
+
+	const TYPED_ARRAYS = {
+		Int8Array: Int8Array,
+		Uint8Array: Uint8Array,
+		Uint8ClampedArray: Uint8ClampedArray,
+		Int16Array: Int16Array,
+		Uint16Array: Uint16Array,
+		Int32Array: Int32Array,
+		Uint32Array: Uint32Array,
+		Float32Array: Float32Array,
+		Float64Array: Float64Array
+	};
+
+	function getTypedArray(type, buffer) {
+		return new TYPED_ARRAYS[type](buffer);
+	}
+
+	function createElementNS(name) {
+		return document.createElementNS('http://www.w3.org/1999/xhtml', name);
+	}
+
 	let _canvas;
 	let _canvas;
 
 
 	class ImageUtils {
 	class ImageUtils {
@@ -1089,7 +1120,7 @@
 			if (image instanceof HTMLCanvasElement) {
 			if (image instanceof HTMLCanvasElement) {
 				canvas = image;
 				canvas = image;
 			} else {
 			} else {
-				if (_canvas === undefined) _canvas = document.createElementNS('http://www.w3.org/1999/xhtml', 'canvas');
+				if (_canvas === undefined) _canvas = createElementNS('canvas');
 				_canvas.width = image.width;
 				_canvas.width = image.width;
 				_canvas.height = image.height;
 				_canvas.height = image.height;
 
 
@@ -5719,6 +5750,13 @@
 			return this;
 			return this;
 		}
 		}
 
 
+		setFromAttributeAndIndices(attribute, i0, i1, i2) {
+			this.a.fromBufferAttribute(attribute, i0);
+			this.b.fromBufferAttribute(attribute, i1);
+			this.c.fromBufferAttribute(attribute, i2);
+			return this;
+		}
+
 		clone() {
 		clone() {
 			return new this.constructor().copy(this);
 			return new this.constructor().copy(this);
 		}
 		}
@@ -7226,33 +7264,6 @@
 
 
 	} //
 	} //
 
 
-	function arrayMax(array) {
-		if (array.length === 0) return -Infinity;
-		let max = array[0];
-
-		for (let i = 1, l = array.length; i < l; ++i) {
-			if (array[i] > max) max = array[i];
-		}
-
-		return max;
-	}
-
-	const TYPED_ARRAYS = {
-		Int8Array: Int8Array,
-		Uint8Array: Uint8Array,
-		Uint8ClampedArray: Uint8ClampedArray,
-		Int16Array: Int16Array,
-		Uint16Array: Uint16Array,
-		Int32Array: Int32Array,
-		Uint32Array: Uint32Array,
-		Float32Array: Float32Array,
-		Float64Array: Float64Array
-	};
-
-	function getTypedArray(type, buffer) {
-		return new TYPED_ARRAYS[type](buffer);
-	}
-
 	let _id = 0;
 	let _id = 0;
 
 
 	const _m1 = /*@__PURE__*/new Matrix4();
 	const _m1 = /*@__PURE__*/new Matrix4();
@@ -16175,7 +16186,7 @@
 
 
 		function createCanvas(width, height) {
 		function createCanvas(width, height) {
 			// Use OffscreenCanvas when available. Specially needed in web workers
 			// Use OffscreenCanvas when available. Specially needed in web workers
-			return useOffscreenCanvas ? new OffscreenCanvas(width, height) : document.createElementNS('http://www.w3.org/1999/xhtml', 'canvas');
+			return useOffscreenCanvas ? new OffscreenCanvas(width, height) : createElementNS('canvas');
 		}
 		}
 
 
 		function resizeImage(image, needsPowerOfTwo, needsNewCanvas, maxSize) {
 		function resizeImage(image, needsPowerOfTwo, needsNewCanvas, maxSize) {
@@ -18512,7 +18523,7 @@
 	}
 	}
 
 
 	function createCanvasElement() {
 	function createCanvasElement() {
-		const canvas = document.createElementNS('http://www.w3.org/1999/xhtml', 'canvas');
+		const canvas = createElementNS('canvas');
 		canvas.style.display = 'block';
 		canvas.style.display = 'block';
 		return canvas;
 		return canvas;
 	}
 	}
@@ -28025,7 +28036,7 @@
 				return cached;
 				return cached;
 			}
 			}
 
 
-			const image = document.createElementNS('http://www.w3.org/1999/xhtml', 'img');
+			const image = createElementNS('img');
 
 
 			function onImageLoad() {
 			function onImageLoad() {
 				image.removeEventListener('load', onImageLoad, false);
 				image.removeEventListener('load', onImageLoad, false);

Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
build/three.min.js


+ 54 - 39
build/three.module.js

@@ -1360,6 +1360,46 @@ class Matrix3 {
 
 
 Matrix3.prototype.isMatrix3 = true;
 Matrix3.prototype.isMatrix3 = true;
 
 
+function arrayMax( array ) {
+
+	if ( array.length === 0 ) return - Infinity;
+
+	let max = array[ 0 ];
+
+	for ( let i = 1, l = array.length; i < l; ++ i ) {
+
+		if ( array[ i ] > max ) max = array[ i ];
+
+	}
+
+	return max;
+
+}
+
+const TYPED_ARRAYS = {
+	Int8Array: Int8Array,
+	Uint8Array: Uint8Array,
+	Uint8ClampedArray: Uint8ClampedArray,
+	Int16Array: Int16Array,
+	Uint16Array: Uint16Array,
+	Int32Array: Int32Array,
+	Uint32Array: Uint32Array,
+	Float32Array: Float32Array,
+	Float64Array: Float64Array
+};
+
+function getTypedArray( type, buffer ) {
+
+	return new TYPED_ARRAYS[ type ]( buffer );
+
+}
+
+function createElementNS( name ) {
+
+	return document.createElementNS( 'http://www.w3.org/1999/xhtml', name );
+
+}
+
 let _canvas;
 let _canvas;
 
 
 class ImageUtils {
 class ImageUtils {
@@ -1386,7 +1426,7 @@ class ImageUtils {
 
 
 		} else {
 		} else {
 
 
-			if ( _canvas === undefined ) _canvas = document.createElementNS( 'http://www.w3.org/1999/xhtml', 'canvas' );
+			if ( _canvas === undefined ) _canvas = createElementNS( 'canvas' );
 
 
 			_canvas.width = image.width;
 			_canvas.width = image.width;
 			_canvas.height = image.height;
 			_canvas.height = image.height;
@@ -7521,6 +7561,16 @@ class Triangle {
 
 
 	}
 	}
 
 
+	setFromAttributeAndIndices( attribute, i0, i1, i2 ) {
+
+		this.a.fromBufferAttribute( attribute, i0 );
+		this.b.fromBufferAttribute( attribute, i1 );
+		this.c.fromBufferAttribute( attribute, i2 );
+
+		return this;
+
+	}
+
 	clone() {
 	clone() {
 
 
 		return new this.constructor().copy( this );
 		return new this.constructor().copy( this );
@@ -9376,40 +9426,6 @@ class Float64BufferAttribute extends BufferAttribute {
 
 
 }
 }
 
 
-function arrayMax( array ) {
-
-	if ( array.length === 0 ) return - Infinity;
-
-	let max = array[ 0 ];
-
-	for ( let i = 1, l = array.length; i < l; ++ i ) {
-
-		if ( array[ i ] > max ) max = array[ i ];
-
-	}
-
-	return max;
-
-}
-
-const TYPED_ARRAYS = {
-	Int8Array: Int8Array,
-	Uint8Array: Uint8Array,
-	Uint8ClampedArray: Uint8ClampedArray,
-	Int16Array: Int16Array,
-	Uint16Array: Uint16Array,
-	Int32Array: Int32Array,
-	Uint32Array: Uint32Array,
-	Float32Array: Float32Array,
-	Float64Array: Float64Array
-};
-
-function getTypedArray( type, buffer ) {
-
-	return new TYPED_ARRAYS[ type ]( buffer );
-
-}
-
 let _id = 0;
 let _id = 0;
 
 
 const _m1 = /*@__PURE__*/ new Matrix4();
 const _m1 = /*@__PURE__*/ new Matrix4();
@@ -21544,8 +21560,7 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
 		// Use OffscreenCanvas when available. Specially needed in web workers
 		// Use OffscreenCanvas when available. Specially needed in web workers
 
 
 		return useOffscreenCanvas ?
 		return useOffscreenCanvas ?
-			new OffscreenCanvas( width, height ) :
-			document.createElementNS( 'http://www.w3.org/1999/xhtml', 'canvas' );
+			new OffscreenCanvas( width, height ) : createElementNS( 'canvas' );
 
 
 	}
 	}
 
 
@@ -24908,7 +24923,7 @@ function WebGLMaterials( properties ) {
 
 
 function createCanvasElement() {
 function createCanvasElement() {
 
 
-	const canvas = document.createElementNS( 'http://www.w3.org/1999/xhtml', 'canvas' );
+	const canvas = createElementNS( 'canvas' );
 	canvas.style.display = 'block';
 	canvas.style.display = 'block';
 	return canvas;
 	return canvas;
 
 
@@ -38466,7 +38481,7 @@ class ImageLoader extends Loader {
 
 
 		}
 		}
 
 
-		const image = document.createElementNS( 'http://www.w3.org/1999/xhtml', 'img' );
+		const image = createElementNS( 'img' );
 
 
 		function onImageLoad() {
 		function onImageLoad() {
 
 

Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff