Mr.doob 7 年之前
父節點
當前提交
c1afee8fea
共有 5 個文件被更改,包括 499 次插入369 次删除
  1. 78 13
      build/three.js
  2. 341 341
      build/three.min.js
  3. 78 13
      build/three.module.js
  4. 1 1
      package.json
  5. 1 1
      src/constants.js

+ 78 - 13
build/three.js

@@ -187,7 +187,7 @@
 
 	} );
 
-	var REVISION = '88dev';
+	var REVISION = '88';
 	var MOUSE = { LEFT: 0, MIDDLE: 1, RIGHT: 2 };
 	var CullFaceNone = 0;
 	var CullFaceBack = 1;
@@ -20810,7 +20810,11 @@
 
 		this.dispose = function () {
 
-			window.removeEventListener( 'vrdisplaypresentchange', onVRDisplayPresentChange );
+			if ( typeof window !== 'undefined' ) {
+
+				window.removeEventListener( 'vrdisplaypresentchange', onVRDisplayPresentChange );
+
+			}
 
 		};
 
@@ -35904,6 +35908,26 @@
 
 			return points;
 
+		},
+
+		copy: function ( source ) {
+
+			Curve.prototype.copy.call( this, source );
+
+			this.curves = [];
+
+			for ( var i = 0, l = source.curves.length; i < l; i ++ ) {
+
+				var curve = source.curves[ i ];
+
+				this.curves.push( curve.clone() );
+
+			}
+
+			this.autoClose = source.autoClose;
+
+			return this;
+
 		}
 
 	} );
@@ -36166,13 +36190,13 @@
 
 	var PathPrototype = Object.assign( Object.create( CurvePath.prototype ), {
 
-		fromPoints: function ( vectors ) {
+		setFromPoints: function ( points ) {
 
-			this.moveTo( vectors[ 0 ].x, vectors[ 0 ].y );
+			this.moveTo( points[ 0 ].x, points[ 0 ].y );
 
-			for ( var i = 1, l = vectors.length; i < l; i ++ ) {
+			for ( var i = 1, l = points.length; i < l; i ++ ) {
 
-				this.lineTo( vectors[ i ].x, vectors[ i ].y );
+				this.lineTo( points[ i ].x, points[ i ].y );
 
 			}
 
@@ -36280,6 +36304,16 @@
 			var lastPoint = curve.getPoint( 1 );
 			this.currentPoint.copy( lastPoint );
 
+		},
+
+		copy: function ( source ) {
+
+			CurvePath.prototype.copy.call( this, source );
+
+			this.currentPoint.copy( source.currentPoint );
+
+			return this;
+
 		}
 
 	} );
@@ -36299,7 +36333,7 @@
 
 		if ( points ) {
 
-			this.fromPoints( points );
+			this.setFromPoints( points );
 
 		}
 
@@ -36319,9 +36353,9 @@
 	// STEP 3a - Extract points from each shape, turn to vertices
 	// STEP 3b - Triangulate each shape, add faces.
 
-	function Shape() {
+	function Shape( points ) {
 
-		Path.apply( this, arguments );
+		Path.call( this, points );
 
 		this.type = 'Shape';
 
@@ -36347,9 +36381,9 @@
 
 		},
 
-		// Get points of shape and holes (keypoints based on segments parameter)
+		// get points of shape and holes (keypoints based on segments parameter)
 
-		extractAllPoints: function ( divisions ) {
+		extractPoints: function ( divisions ) {
 
 			return {
 
@@ -36360,9 +36394,21 @@
 
 		},
 
-		extractPoints: function ( divisions ) {
+		copy: function ( source ) {
+
+			Path.prototype.copy.call( this, source );
+
+			this.holes = [];
+
+			for ( var i = 0, l = source.holes.length; i < l; i ++ ) {
 
-			return this.extractAllPoints( divisions );
+				var hole = source.holes[ i ];
+
+				this.holes.push( hole.clone() );
+
+			}
+
+			return this;
 
 		}
 
@@ -43232,6 +43278,19 @@
 
 	//
 
+	Object.assign( Path.prototype, {
+
+		fromPoints: function ( points ) {
+
+			console.warn( 'THREE.Path: .fromPoints() has been renamed to .setFromPoints().' );
+			this.setFromPoints( points );
+
+		}
+
+	} );
+
+	//
+
 	function ClosedSplineCurve3( points ) {
 
 		console.warn( 'THREE.ClosedSplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead.' );
@@ -43628,6 +43687,12 @@
 
 	Object.assign( Shape.prototype, {
 
+		extractAllPoints: function ( divisions ) {
+
+			console.warn( 'THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead.' );
+			return this.extractPoints( divisions );
+
+		},
 		extrude: function ( options ) {
 
 			console.warn( 'THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead.' );

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


+ 78 - 13
build/three.module.js

@@ -181,7 +181,7 @@ Object.assign( EventDispatcher.prototype, {
 
 } );
 
-var REVISION = '88dev';
+var REVISION = '88';
 var MOUSE = { LEFT: 0, MIDDLE: 1, RIGHT: 2 };
 var CullFaceNone = 0;
 var CullFaceBack = 1;
@@ -20804,7 +20804,11 @@ function WebVRManager( renderer ) {
 
 	this.dispose = function () {
 
-		window.removeEventListener( 'vrdisplaypresentchange', onVRDisplayPresentChange );
+		if ( typeof window !== 'undefined' ) {
+
+			window.removeEventListener( 'vrdisplaypresentchange', onVRDisplayPresentChange );
+
+		}
 
 	};
 
@@ -35898,6 +35902,26 @@ CurvePath.prototype = Object.assign( Object.create( Curve.prototype ), {
 
 		return points;
 
+	},
+
+	copy: function ( source ) {
+
+		Curve.prototype.copy.call( this, source );
+
+		this.curves = [];
+
+		for ( var i = 0, l = source.curves.length; i < l; i ++ ) {
+
+			var curve = source.curves[ i ];
+
+			this.curves.push( curve.clone() );
+
+		}
+
+		this.autoClose = source.autoClose;
+
+		return this;
+
 	}
 
 } );
@@ -36160,13 +36184,13 @@ QuadraticBezierCurve.prototype.copy = function ( source ) {
 
 var PathPrototype = Object.assign( Object.create( CurvePath.prototype ), {
 
-	fromPoints: function ( vectors ) {
+	setFromPoints: function ( points ) {
 
-		this.moveTo( vectors[ 0 ].x, vectors[ 0 ].y );
+		this.moveTo( points[ 0 ].x, points[ 0 ].y );
 
-		for ( var i = 1, l = vectors.length; i < l; i ++ ) {
+		for ( var i = 1, l = points.length; i < l; i ++ ) {
 
-			this.lineTo( vectors[ i ].x, vectors[ i ].y );
+			this.lineTo( points[ i ].x, points[ i ].y );
 
 		}
 
@@ -36274,6 +36298,16 @@ var PathPrototype = Object.assign( Object.create( CurvePath.prototype ), {
 		var lastPoint = curve.getPoint( 1 );
 		this.currentPoint.copy( lastPoint );
 
+	},
+
+	copy: function ( source ) {
+
+		CurvePath.prototype.copy.call( this, source );
+
+		this.currentPoint.copy( source.currentPoint );
+
+		return this;
+
 	}
 
 } );
@@ -36293,7 +36327,7 @@ function Path( points ) {
 
 	if ( points ) {
 
-		this.fromPoints( points );
+		this.setFromPoints( points );
 
 	}
 
@@ -36313,9 +36347,9 @@ PathPrototype.constructor = Path;
 // STEP 3a - Extract points from each shape, turn to vertices
 // STEP 3b - Triangulate each shape, add faces.
 
-function Shape() {
+function Shape( points ) {
 
-	Path.apply( this, arguments );
+	Path.call( this, points );
 
 	this.type = 'Shape';
 
@@ -36341,9 +36375,9 @@ Shape.prototype = Object.assign( Object.create( PathPrototype ), {
 
 	},
 
-	// Get points of shape and holes (keypoints based on segments parameter)
+	// get points of shape and holes (keypoints based on segments parameter)
 
-	extractAllPoints: function ( divisions ) {
+	extractPoints: function ( divisions ) {
 
 		return {
 
@@ -36354,9 +36388,21 @@ Shape.prototype = Object.assign( Object.create( PathPrototype ), {
 
 	},
 
-	extractPoints: function ( divisions ) {
+	copy: function ( source ) {
+
+		Path.prototype.copy.call( this, source );
+
+		this.holes = [];
+
+		for ( var i = 0, l = source.holes.length; i < l; i ++ ) {
 
-		return this.extractAllPoints( divisions );
+			var hole = source.holes[ i ];
+
+			this.holes.push( hole.clone() );
+
+		}
+
+		return this;
 
 	}
 
@@ -43226,6 +43272,19 @@ Object.assign( CurvePath.prototype, {
 
 //
 
+Object.assign( Path.prototype, {
+
+	fromPoints: function ( points ) {
+
+		console.warn( 'THREE.Path: .fromPoints() has been renamed to .setFromPoints().' );
+		this.setFromPoints( points );
+
+	}
+
+} );
+
+//
+
 function ClosedSplineCurve3( points ) {
 
 	console.warn( 'THREE.ClosedSplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead.' );
@@ -43622,6 +43681,12 @@ Object.assign( Ray.prototype, {
 
 Object.assign( Shape.prototype, {
 
+	extractAllPoints: function ( divisions ) {
+
+		console.warn( 'THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead.' );
+		return this.extractPoints( divisions );
+
+	},
 	extrude: function ( options ) {
 
 		console.warn( 'THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead.' );

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "three",
-  "version": "0.87.1",
+  "version": "0.88.0",
   "description": "JavaScript 3D library",
   "main": "build/three.js",
   "repository": "mrdoob/three.js",

+ 1 - 1
src/constants.js

@@ -1,4 +1,4 @@
-export var REVISION = '88dev';
+export var REVISION = '88';
 export var MOUSE = { LEFT: 0, MIDDLE: 1, RIGHT: 2 };
 export var CullFaceNone = 0;
 export var CullFaceBack = 1;

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