Browse Source

Updated builds

Mr.doob 4 years ago
parent
commit
cf0ee8b2a3
3 changed files with 148 additions and 86 deletions
  1. 112 26
      build/three.js
  2. 0 0
      build/three.min.js
  3. 36 60
      build/three.module.js

+ 112 - 26
build/three.js

@@ -772,15 +772,24 @@
 		};
 		};
 
 
 		_proto.fromArray = function fromArray(array, offset) {
 		_proto.fromArray = function fromArray(array, offset) {
-			if (offset === undefined) offset = 0;
+			if (offset === void 0) {
+				offset = 0;
+			}
+
 			this.x = array[offset];
 			this.x = array[offset];
 			this.y = array[offset + 1];
 			this.y = array[offset + 1];
 			return this;
 			return this;
 		};
 		};
 
 
 		_proto.toArray = function toArray(array, offset) {
 		_proto.toArray = function toArray(array, offset) {
-			if (array === undefined) array = [];
-			if (offset === undefined) offset = 0;
+			if (array === void 0) {
+				array = [];
+			}
+
+			if (offset === void 0) {
+				offset = 0;
+			}
+
 			array[offset] = this.x;
 			array[offset] = this.x;
 			array[offset + 1] = this.y;
 			array[offset + 1] = this.y;
 			return array;
 			return array;
@@ -1094,7 +1103,9 @@
 		};
 		};
 
 
 		_proto.fromArray = function fromArray(array, offset) {
 		_proto.fromArray = function fromArray(array, offset) {
-			if (offset === undefined) offset = 0;
+			if (offset === void 0) {
+				offset = 0;
+			}
 
 
 			for (var i = 0; i < 9; i++) {
 			for (var i = 0; i < 9; i++) {
 				this.elements[i] = array[i + offset];
 				this.elements[i] = array[i + offset];
@@ -1104,8 +1115,14 @@
 		};
 		};
 
 
 		_proto.toArray = function toArray(array, offset) {
 		_proto.toArray = function toArray(array, offset) {
-			if (array === undefined) array = [];
-			if (offset === undefined) offset = 0;
+			if (array === void 0) {
+				array = [];
+			}
+
+			if (offset === void 0) {
+				offset = 0;
+			}
+
 			var te = this.elements;
 			var te = this.elements;
 			array[offset] = te[0];
 			array[offset] = te[0];
 			array[offset + 1] = te[1];
 			array[offset + 1] = te[1];
@@ -1817,7 +1834,10 @@
 		};
 		};
 
 
 		_proto.fromArray = function fromArray(array, offset) {
 		_proto.fromArray = function fromArray(array, offset) {
-			if (offset === undefined) offset = 0;
+			if (offset === void 0) {
+				offset = 0;
+			}
+
 			this.x = array[offset];
 			this.x = array[offset];
 			this.y = array[offset + 1];
 			this.y = array[offset + 1];
 			this.z = array[offset + 2];
 			this.z = array[offset + 2];
@@ -1826,8 +1846,14 @@
 		};
 		};
 
 
 		_proto.toArray = function toArray(array, offset) {
 		_proto.toArray = function toArray(array, offset) {
-			if (array === undefined) array = [];
-			if (offset === undefined) offset = 0;
+			if (array === void 0) {
+				array = [];
+			}
+
+			if (offset === void 0) {
+				offset = 0;
+			}
+
 			array[offset] = this.x;
 			array[offset] = this.x;
 			array[offset + 1] = this.y;
 			array[offset + 1] = this.y;
 			array[offset + 2] = this.z;
 			array[offset + 2] = this.z;
@@ -2395,7 +2421,10 @@
 		};
 		};
 
 
 		_proto.fromArray = function fromArray(array, offset) {
 		_proto.fromArray = function fromArray(array, offset) {
-			if (offset === undefined) offset = 0;
+			if (offset === void 0) {
+				offset = 0;
+			}
+
 			this._x = array[offset];
 			this._x = array[offset];
 			this._y = array[offset + 1];
 			this._y = array[offset + 1];
 			this._z = array[offset + 2];
 			this._z = array[offset + 2];
@@ -2407,8 +2436,14 @@
 		};
 		};
 
 
 		_proto.toArray = function toArray(array, offset) {
 		_proto.toArray = function toArray(array, offset) {
-			if (array === undefined) array = [];
-			if (offset === undefined) offset = 0;
+			if (array === void 0) {
+				array = [];
+			}
+
+			if (offset === void 0) {
+				offset = 0;
+			}
+
 			array[offset] = this._x;
 			array[offset] = this._x;
 			array[offset + 1] = this._y;
 			array[offset + 1] = this._y;
 			array[offset + 2] = this._z;
 			array[offset + 2] = this._z;
@@ -2981,7 +3016,10 @@
 		};
 		};
 
 
 		_proto.fromArray = function fromArray(array, offset) {
 		_proto.fromArray = function fromArray(array, offset) {
-			if (offset === undefined) offset = 0;
+			if (offset === void 0) {
+				offset = 0;
+			}
+
 			this.x = array[offset];
 			this.x = array[offset];
 			this.y = array[offset + 1];
 			this.y = array[offset + 1];
 			this.z = array[offset + 2];
 			this.z = array[offset + 2];
@@ -2989,8 +3027,14 @@
 		};
 		};
 
 
 		_proto.toArray = function toArray(array, offset) {
 		_proto.toArray = function toArray(array, offset) {
-			if (array === undefined) array = [];
-			if (offset === undefined) offset = 0;
+			if (array === void 0) {
+				array = [];
+			}
+
+			if (offset === void 0) {
+				offset = 0;
+			}
+
 			array[offset] = this.x;
 			array[offset] = this.x;
 			array[offset + 1] = this.y;
 			array[offset + 1] = this.y;
 			array[offset + 2] = this.z;
 			array[offset + 2] = this.z;
@@ -4648,7 +4692,9 @@
 		};
 		};
 
 
 		_proto.fromArray = function fromArray(array, offset) {
 		_proto.fromArray = function fromArray(array, offset) {
-			if (offset === undefined) offset = 0;
+			if (offset === void 0) {
+				offset = 0;
+			}
 
 
 			for (var i = 0; i < 16; i++) {
 			for (var i = 0; i < 16; i++) {
 				this.elements[i] = array[i + offset];
 				this.elements[i] = array[i + offset];
@@ -4658,8 +4704,14 @@
 		};
 		};
 
 
 		_proto.toArray = function toArray(array, offset) {
 		_proto.toArray = function toArray(array, offset) {
-			if (array === undefined) array = [];
-			if (offset === undefined) offset = 0;
+			if (array === void 0) {
+				array = [];
+			}
+
+			if (offset === void 0) {
+				offset = 0;
+			}
+
 			var te = this.elements;
 			var te = this.elements;
 			array[offset] = te[0];
 			array[offset] = te[0];
 			array[offset + 1] = te[1];
 			array[offset + 1] = te[1];
@@ -4888,8 +4940,14 @@
 		};
 		};
 
 
 		_proto.toArray = function toArray(array, offset) {
 		_proto.toArray = function toArray(array, offset) {
-			if (array === undefined) array = [];
-			if (offset === undefined) offset = 0;
+			if (array === void 0) {
+				array = [];
+			}
+
+			if (offset === void 0) {
+				offset = 0;
+			}
+
 			array[offset] = this._x;
 			array[offset] = this._x;
 			array[offset + 1] = this._y;
 			array[offset + 1] = this._y;
 			array[offset + 2] = this._z;
 			array[offset + 2] = this._z;
@@ -5255,6 +5313,16 @@
 
 
 			return this;
 			return this;
 		},
 		},
+		removeAll: function removeAll() {
+			for (var i = 0; i < this.children.length; i++) {
+				var object = this.children[i];
+				object.parent = null;
+				object.dispatchEvent(_removedEvent);
+			}
+
+			this.children.length = 0;
+			return this;
+		},
 		attach: function attach(object) {
 		attach: function attach(object) {
 			// adds object as a child of this, while maintaining the object's world transform
 			// adds object as a child of this, while maintaining the object's world transform
 			this.updateWorldMatrix(true, false);
 			this.updateWorldMatrix(true, false);
@@ -6542,7 +6610,10 @@
 		};
 		};
 
 
 		_proto.fromArray = function fromArray(array, offset) {
 		_proto.fromArray = function fromArray(array, offset) {
-			if (offset === undefined) offset = 0;
+			if (offset === void 0) {
+				offset = 0;
+			}
+
 			this.r = array[offset];
 			this.r = array[offset];
 			this.g = array[offset + 1];
 			this.g = array[offset + 1];
 			this.b = array[offset + 2];
 			this.b = array[offset + 2];
@@ -6550,8 +6621,14 @@
 		};
 		};
 
 
 		_proto.toArray = function toArray(array, offset) {
 		_proto.toArray = function toArray(array, offset) {
-			if (array === undefined) array = [];
-			if (offset === undefined) offset = 0;
+			if (array === void 0) {
+				array = [];
+			}
+
+			if (offset === void 0) {
+				offset = 0;
+			}
+
 			array[offset] = this.r;
 			array[offset] = this.r;
 			array[offset + 1] = this.g;
 			array[offset + 1] = this.g;
 			array[offset + 2] = this.b;
 			array[offset + 2] = this.b;
@@ -28982,7 +29059,10 @@
 		};
 		};
 
 
 		_proto.fromArray = function fromArray(array, offset) {
 		_proto.fromArray = function fromArray(array, offset) {
-			if (offset === undefined) offset = 0;
+			if (offset === void 0) {
+				offset = 0;
+			}
+
 			var coefficients = this.coefficients;
 			var coefficients = this.coefficients;
 
 
 			for (var i = 0; i < 9; i++) {
 			for (var i = 0; i < 9; i++) {
@@ -28993,8 +29073,14 @@
 		};
 		};
 
 
 		_proto.toArray = function toArray(array, offset) {
 		_proto.toArray = function toArray(array, offset) {
-			if (array === undefined) array = [];
-			if (offset === undefined) offset = 0;
+			if (array === void 0) {
+				array = [];
+			}
+
+			if (offset === void 0) {
+				offset = 0;
+			}
+
 			var coefficients = this.coefficients;
 			var coefficients = this.coefficients;
 
 
 			for (var i = 0; i < 9; i++) {
 			for (var i = 0; i < 9; i++) {

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


+ 36 - 60
build/three.module.js

@@ -917,9 +917,7 @@ class Vector2 {
 
 
 	}
 	}
 
 
-	fromArray( array, offset ) {
-
-		if ( offset === undefined ) offset = 0;
+	fromArray( array, offset = 0 ) {
 
 
 		this.x = array[ offset ];
 		this.x = array[ offset ];
 		this.y = array[ offset + 1 ];
 		this.y = array[ offset + 1 ];
@@ -928,10 +926,7 @@ class Vector2 {
 
 
 	}
 	}
 
 
-	toArray( array, offset ) {
-
-		if ( array === undefined ) array = [];
-		if ( offset === undefined ) offset = 0;
+	toArray( array = [], offset = 0 ) {
 
 
 		array[ offset ] = this.x;
 		array[ offset ] = this.x;
 		array[ offset + 1 ] = this.y;
 		array[ offset + 1 ] = this.y;
@@ -1289,9 +1284,7 @@ class Matrix3 {
 
 
 	}
 	}
 
 
-	fromArray( array, offset ) {
-
-		if ( offset === undefined ) offset = 0;
+	fromArray( array, offset = 0 ) {
 
 
 		for ( let i = 0; i < 9; i ++ ) {
 		for ( let i = 0; i < 9; i ++ ) {
 
 
@@ -1303,10 +1296,7 @@ class Matrix3 {
 
 
 	}
 	}
 
 
-	toArray( array, offset ) {
-
-		if ( array === undefined ) array = [];
-		if ( offset === undefined ) offset = 0;
+	toArray( array = [], offset = 0 ) {
 
 
 		const te = this.elements;
 		const te = this.elements;
 
 
@@ -2291,9 +2281,7 @@ class Vector4 {
 
 
 	}
 	}
 
 
-	fromArray( array, offset ) {
-
-		if ( offset === undefined ) offset = 0;
+	fromArray( array, offset = 0 ) {
 
 
 		this.x = array[ offset ];
 		this.x = array[ offset ];
 		this.y = array[ offset + 1 ];
 		this.y = array[ offset + 1 ];
@@ -2304,10 +2292,7 @@ class Vector4 {
 
 
 	}
 	}
 
 
-	toArray( array, offset ) {
-
-		if ( array === undefined ) array = [];
-		if ( offset === undefined ) offset = 0;
+	toArray( array = [], offset = 0 ) {
 
 
 		array[ offset ] = this.x;
 		array[ offset ] = this.x;
 		array[ offset + 1 ] = this.y;
 		array[ offset + 1 ] = this.y;
@@ -3051,9 +3036,7 @@ class Quaternion {
 
 
 	}
 	}
 
 
-	fromArray( array, offset ) {
-
-		if ( offset === undefined ) offset = 0;
+	fromArray( array, offset = 0 ) {
 
 
 		this._x = array[ offset ];
 		this._x = array[ offset ];
 		this._y = array[ offset + 1 ];
 		this._y = array[ offset + 1 ];
@@ -3066,10 +3049,7 @@ class Quaternion {
 
 
 	}
 	}
 
 
-	toArray( array, offset ) {
-
-		if ( array === undefined ) array = [];
-		if ( offset === undefined ) offset = 0;
+	toArray( array = [], offset = 0 ) {
 
 
 		array[ offset ] = this._x;
 		array[ offset ] = this._x;
 		array[ offset + 1 ] = this._y;
 		array[ offset + 1 ] = this._y;
@@ -3769,9 +3749,7 @@ class Vector3 {
 
 
 	}
 	}
 
 
-	fromArray( array, offset ) {
-
-		if ( offset === undefined ) offset = 0;
+	fromArray( array, offset = 0 ) {
 
 
 		this.x = array[ offset ];
 		this.x = array[ offset ];
 		this.y = array[ offset + 1 ];
 		this.y = array[ offset + 1 ];
@@ -3781,10 +3759,7 @@ class Vector3 {
 
 
 	}
 	}
 
 
-	toArray( array, offset ) {
-
-		if ( array === undefined ) array = [];
-		if ( offset === undefined ) offset = 0;
+	toArray( array = [], offset = 0 ) {
 
 
 		array[ offset ] = this.x;
 		array[ offset ] = this.x;
 		array[ offset + 1 ] = this.y;
 		array[ offset + 1 ] = this.y;
@@ -5887,9 +5862,7 @@ class Matrix4 {
 
 
 	}
 	}
 
 
-	fromArray( array, offset ) {
-
-		if ( offset === undefined ) offset = 0;
+	fromArray( array, offset = 0 ) {
 
 
 		for ( let i = 0; i < 16; i ++ ) {
 		for ( let i = 0; i < 16; i ++ ) {
 
 
@@ -5901,10 +5874,7 @@ class Matrix4 {
 
 
 	}
 	}
 
 
-	toArray( array, offset ) {
-
-		if ( array === undefined ) array = [];
-		if ( offset === undefined ) offset = 0;
+	toArray( array = [], offset = 0 ) {
 
 
 		const te = this.elements;
 		const te = this.elements;
 
 
@@ -6219,10 +6189,7 @@ class Euler {
 
 
 	}
 	}
 
 
-	toArray( array, offset ) {
-
-		if ( array === undefined ) array = [];
-		if ( offset === undefined ) offset = 0;
+	toArray( array = [], offset = 0 ) {
 
 
 		array[ offset ] = this._x;
 		array[ offset ] = this._x;
 		array[ offset + 1 ] = this._y;
 		array[ offset + 1 ] = this._y;
@@ -6680,6 +6647,25 @@ Object3D.prototype = Object.assign( Object.create( EventDispatcher.prototype ),
 
 
 	},
 	},
 
 
+	removeAll: function () {
+
+		for ( let i = 0; i < this.children.length; i ++ ) {
+
+			const object = this.children[ i ];
+
+			object.parent = null;
+
+			object.dispatchEvent( _removedEvent );
+
+		}
+
+		this.children.length = 0;
+
+		return this;
+
+
+	},
+
 	attach: function ( object ) {
 	attach: function ( object ) {
 
 
 		// adds object as a child of this, while maintaining the object's world transform
 		// adds object as a child of this, while maintaining the object's world transform
@@ -8255,9 +8241,7 @@ class Color {
 
 
 	}
 	}
 
 
-	fromArray( array, offset ) {
-
-		if ( offset === undefined ) offset = 0;
+	fromArray( array, offset = 0 ) {
 
 
 		this.r = array[ offset ];
 		this.r = array[ offset ];
 		this.g = array[ offset + 1 ];
 		this.g = array[ offset + 1 ];
@@ -8267,10 +8251,7 @@ class Color {
 
 
 	}
 	}
 
 
-	toArray( array, offset ) {
-
-		if ( array === undefined ) array = [];
-		if ( offset === undefined ) offset = 0;
+	toArray( array = [], offset = 0 ) {
 
 
 		array[ offset ] = this.r;
 		array[ offset ] = this.r;
 		array[ offset + 1 ] = this.g;
 		array[ offset + 1 ] = this.g;
@@ -39922,9 +39903,7 @@ class SphericalHarmonics3 {
 
 
 	}
 	}
 
 
-	fromArray( array, offset ) {
-
-		if ( offset === undefined ) offset = 0;
+	fromArray( array, offset = 0 ) {
 
 
 		const coefficients = this.coefficients;
 		const coefficients = this.coefficients;
 
 
@@ -39938,10 +39917,7 @@ class SphericalHarmonics3 {
 
 
 	}
 	}
 
 
-	toArray( array, offset ) {
-
-		if ( array === undefined ) array = [];
-		if ( offset === undefined ) offset = 0;
+	toArray( array = [], offset = 0 ) {
 
 
 		const coefficients = this.coefficients;
 		const coefficients = this.coefficients;
 
 

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