瀏覽代碼

Updated builds.

Mugen87 2 年之前
父節點
當前提交
dd35601f1f
共有 4 個文件被更改,包括 186 次插入48 次删除
  1. 62 16
      build/three.cjs
  2. 62 16
      build/three.js
  3. 0 0
      build/three.min.js
  4. 62 16
      build/three.module.js

+ 62 - 16
build/three.cjs

@@ -2131,6 +2131,12 @@ class Quaternion {
 
 	}
 
+	toJSON() {
+
+		return this.toArray();
+
+	}
+
 	_onChange( callback ) {
 
 		this._onChangeCallback = callback;
@@ -2788,6 +2794,16 @@ class Vector3 {
 
 	}
 
+	setFromColor( c ) {
+
+		this.x = c.r;
+		this.y = c.g;
+		this.z = c.b;
+
+		return this;
+
+	}
+
 	equals( v ) {
 
 		return ( ( v.x === this.x ) && ( v.y === this.y ) && ( v.z === this.z ) );
@@ -7893,6 +7909,8 @@ const _vap = /*@__PURE__*/ new Vector3();
 const _vbp = /*@__PURE__*/ new Vector3();
 const _vcp = /*@__PURE__*/ new Vector3();
 
+let warnedGetUV = false;
+
 class Triangle {
 
 	constructor( a = new Vector3(), b = new Vector3(), c = new Vector3() ) {
@@ -7964,7 +7982,13 @@ class Triangle {
 
 	static getUV( point, p1, p2, p3, uv1, uv2, uv3, target ) {
 
-		console.warn( 'THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation().' );
+		if ( warnedGetUV === false ) {
+
+			console.warn( 'THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation().' ); // @deprecated since r151
+
+			warnedGetUV = true;
+
+		}
 
 		return this.getInterpolation( point, p1, p2, p3, uv1, uv2, uv3, target );
 
@@ -8074,7 +8098,13 @@ class Triangle {
 
 	getUV( point, uv1, uv2, uv3, target ) {
 
-		console.warn( 'Triangle.getUV() has been renamed to Triangle.getInterpolation().' );
+		if ( warnedGetUV === false ) {
+
+			console.warn( 'THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation().' ); // @deprecated since r151
+
+			warnedGetUV = true;
+
+		}
 
 		return Triangle.getInterpolation( point, this.a, this.b, this.c, uv1, uv2, uv3, target );
 
@@ -8924,24 +8954,17 @@ class Color {
 			if ( size === 3 ) {
 
 				// #ff0
-				this.r = parseInt( hex.charAt( 0 ) + hex.charAt( 0 ), 16 ) / 255;
-				this.g = parseInt( hex.charAt( 1 ) + hex.charAt( 1 ), 16 ) / 255;
-				this.b = parseInt( hex.charAt( 2 ) + hex.charAt( 2 ), 16 ) / 255;
-
-				ColorManagement.toWorkingColorSpace( this, colorSpace );
-
-				return this;
+				return this.setRGB(
+					parseInt( hex.charAt( 0 ), 16 ) / 15,
+					parseInt( hex.charAt( 1 ), 16 ) / 15,
+					parseInt( hex.charAt( 2 ), 16 ) / 15,
+					colorSpace
+				);
 
 			} else if ( size === 6 ) {
 
 				// #ff0000
-				this.r = parseInt( hex.charAt( 0 ) + hex.charAt( 1 ), 16 ) / 255;
-				this.g = parseInt( hex.charAt( 2 ) + hex.charAt( 3 ), 16 ) / 255;
-				this.b = parseInt( hex.charAt( 4 ) + hex.charAt( 5 ), 16 ) / 255;
-
-				ColorManagement.toWorkingColorSpace( this, colorSpace );
-
-				return this;
+				return this.setHex( parseInt( hex, 16 ), colorSpace );
 
 			} else {
 
@@ -9227,6 +9250,29 @@ class Color {
 
 	}
 
+	setFromVector3( v ) {
+
+		this.r = v.x;
+		this.g = v.y;
+		this.b = v.z;
+
+		return this;
+
+	}
+
+	applyMatrix3( m ) {
+
+		const r = this.r, g = this.g, b = this.b;
+		const e = m.elements;
+
+		this.r = e[ 0 ] * r + e[ 3 ] * g + e[ 6 ] * b;
+		this.g = e[ 1 ] * r + e[ 4 ] * g + e[ 7 ] * b;
+		this.b = e[ 2 ] * r + e[ 5 ] * g + e[ 8 ] * b;
+
+		return this;
+
+	}
+
 	equals( c ) {
 
 		return ( c.r === this.r ) && ( c.g === this.g ) && ( c.b === this.b );

+ 62 - 16
build/three.js

@@ -2136,6 +2136,12 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
 
 		}
 
+		toJSON() {
+
+			return this.toArray();
+
+		}
+
 		_onChange( callback ) {
 
 			this._onChangeCallback = callback;
@@ -2793,6 +2799,16 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
 
 		}
 
+		setFromColor( c ) {
+
+			this.x = c.r;
+			this.y = c.g;
+			this.z = c.b;
+
+			return this;
+
+		}
+
 		equals( v ) {
 
 			return ( ( v.x === this.x ) && ( v.y === this.y ) && ( v.z === this.z ) );
@@ -7898,6 +7914,8 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
 	const _vbp = /*@__PURE__*/ new Vector3();
 	const _vcp = /*@__PURE__*/ new Vector3();
 
+	let warnedGetUV = false;
+
 	class Triangle {
 
 		constructor( a = new Vector3(), b = new Vector3(), c = new Vector3() ) {
@@ -7969,7 +7987,13 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
 
 		static getUV( point, p1, p2, p3, uv1, uv2, uv3, target ) {
 
-			console.warn( 'THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation().' );
+			if ( warnedGetUV === false ) {
+
+				console.warn( 'THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation().' ); // @deprecated since r151
+
+				warnedGetUV = true;
+
+			}
 
 			return this.getInterpolation( point, p1, p2, p3, uv1, uv2, uv3, target );
 
@@ -8079,7 +8103,13 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
 
 		getUV( point, uv1, uv2, uv3, target ) {
 
-			console.warn( 'Triangle.getUV() has been renamed to Triangle.getInterpolation().' );
+			if ( warnedGetUV === false ) {
+
+				console.warn( 'THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation().' ); // @deprecated since r151
+
+				warnedGetUV = true;
+
+			}
 
 			return Triangle.getInterpolation( point, this.a, this.b, this.c, uv1, uv2, uv3, target );
 
@@ -8929,24 +8959,17 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
 				if ( size === 3 ) {
 
 					// #ff0
-					this.r = parseInt( hex.charAt( 0 ) + hex.charAt( 0 ), 16 ) / 255;
-					this.g = parseInt( hex.charAt( 1 ) + hex.charAt( 1 ), 16 ) / 255;
-					this.b = parseInt( hex.charAt( 2 ) + hex.charAt( 2 ), 16 ) / 255;
-
-					ColorManagement.toWorkingColorSpace( this, colorSpace );
-
-					return this;
+					return this.setRGB(
+						parseInt( hex.charAt( 0 ), 16 ) / 15,
+						parseInt( hex.charAt( 1 ), 16 ) / 15,
+						parseInt( hex.charAt( 2 ), 16 ) / 15,
+						colorSpace
+					);
 
 				} else if ( size === 6 ) {
 
 					// #ff0000
-					this.r = parseInt( hex.charAt( 0 ) + hex.charAt( 1 ), 16 ) / 255;
-					this.g = parseInt( hex.charAt( 2 ) + hex.charAt( 3 ), 16 ) / 255;
-					this.b = parseInt( hex.charAt( 4 ) + hex.charAt( 5 ), 16 ) / 255;
-
-					ColorManagement.toWorkingColorSpace( this, colorSpace );
-
-					return this;
+					return this.setHex( parseInt( hex, 16 ), colorSpace );
 
 				} else {
 
@@ -9232,6 +9255,29 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
 
 		}
 
+		setFromVector3( v ) {
+
+			this.r = v.x;
+			this.g = v.y;
+			this.b = v.z;
+
+			return this;
+
+		}
+
+		applyMatrix3( m ) {
+
+			const r = this.r, g = this.g, b = this.b;
+			const e = m.elements;
+
+			this.r = e[ 0 ] * r + e[ 3 ] * g + e[ 6 ] * b;
+			this.g = e[ 1 ] * r + e[ 4 ] * g + e[ 7 ] * b;
+			this.b = e[ 2 ] * r + e[ 5 ] * g + e[ 8 ] * b;
+
+			return this;
+
+		}
+
 		equals( c ) {
 
 			return ( c.r === this.r ) && ( c.g === this.g ) && ( c.b === this.b );

文件差異過大導致無法顯示
+ 0 - 0
build/three.min.js


+ 62 - 16
build/three.module.js

@@ -2129,6 +2129,12 @@ class Quaternion {
 
 	}
 
+	toJSON() {
+
+		return this.toArray();
+
+	}
+
 	_onChange( callback ) {
 
 		this._onChangeCallback = callback;
@@ -2786,6 +2792,16 @@ class Vector3 {
 
 	}
 
+	setFromColor( c ) {
+
+		this.x = c.r;
+		this.y = c.g;
+		this.z = c.b;
+
+		return this;
+
+	}
+
 	equals( v ) {
 
 		return ( ( v.x === this.x ) && ( v.y === this.y ) && ( v.z === this.z ) );
@@ -7891,6 +7907,8 @@ const _vap = /*@__PURE__*/ new Vector3();
 const _vbp = /*@__PURE__*/ new Vector3();
 const _vcp = /*@__PURE__*/ new Vector3();
 
+let warnedGetUV = false;
+
 class Triangle {
 
 	constructor( a = new Vector3(), b = new Vector3(), c = new Vector3() ) {
@@ -7962,7 +7980,13 @@ class Triangle {
 
 	static getUV( point, p1, p2, p3, uv1, uv2, uv3, target ) {
 
-		console.warn( 'THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation().' );
+		if ( warnedGetUV === false ) {
+
+			console.warn( 'THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation().' ); // @deprecated since r151
+
+			warnedGetUV = true;
+
+		}
 
 		return this.getInterpolation( point, p1, p2, p3, uv1, uv2, uv3, target );
 
@@ -8072,7 +8096,13 @@ class Triangle {
 
 	getUV( point, uv1, uv2, uv3, target ) {
 
-		console.warn( 'Triangle.getUV() has been renamed to Triangle.getInterpolation().' );
+		if ( warnedGetUV === false ) {
+
+			console.warn( 'THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation().' ); // @deprecated since r151
+
+			warnedGetUV = true;
+
+		}
 
 		return Triangle.getInterpolation( point, this.a, this.b, this.c, uv1, uv2, uv3, target );
 
@@ -8922,24 +8952,17 @@ class Color {
 			if ( size === 3 ) {
 
 				// #ff0
-				this.r = parseInt( hex.charAt( 0 ) + hex.charAt( 0 ), 16 ) / 255;
-				this.g = parseInt( hex.charAt( 1 ) + hex.charAt( 1 ), 16 ) / 255;
-				this.b = parseInt( hex.charAt( 2 ) + hex.charAt( 2 ), 16 ) / 255;
-
-				ColorManagement.toWorkingColorSpace( this, colorSpace );
-
-				return this;
+				return this.setRGB(
+					parseInt( hex.charAt( 0 ), 16 ) / 15,
+					parseInt( hex.charAt( 1 ), 16 ) / 15,
+					parseInt( hex.charAt( 2 ), 16 ) / 15,
+					colorSpace
+				);
 
 			} else if ( size === 6 ) {
 
 				// #ff0000
-				this.r = parseInt( hex.charAt( 0 ) + hex.charAt( 1 ), 16 ) / 255;
-				this.g = parseInt( hex.charAt( 2 ) + hex.charAt( 3 ), 16 ) / 255;
-				this.b = parseInt( hex.charAt( 4 ) + hex.charAt( 5 ), 16 ) / 255;
-
-				ColorManagement.toWorkingColorSpace( this, colorSpace );
-
-				return this;
+				return this.setHex( parseInt( hex, 16 ), colorSpace );
 
 			} else {
 
@@ -9225,6 +9248,29 @@ class Color {
 
 	}
 
+	setFromVector3( v ) {
+
+		this.r = v.x;
+		this.g = v.y;
+		this.b = v.z;
+
+		return this;
+
+	}
+
+	applyMatrix3( m ) {
+
+		const r = this.r, g = this.g, b = this.b;
+		const e = m.elements;
+
+		this.r = e[ 0 ] * r + e[ 3 ] * g + e[ 6 ] * b;
+		this.g = e[ 1 ] * r + e[ 4 ] * g + e[ 7 ] * b;
+		this.b = e[ 2 ] * r + e[ 5 ] * g + e[ 8 ] * b;
+
+		return this;
+
+	}
+
 	equals( c ) {
 
 		return ( c.r === this.r ) && ( c.g === this.g ) && ( c.b === this.b );

部分文件因文件數量過多而無法顯示