提交 c1afee8f 编写于 作者: M Mr.doob

r88

上级 e3cbd305
...@@ -187,7 +187,7 @@ ...@@ -187,7 +187,7 @@
} ); } );
var REVISION = '88dev'; var REVISION = '88';
var MOUSE = { LEFT: 0, MIDDLE: 1, RIGHT: 2 }; var MOUSE = { LEFT: 0, MIDDLE: 1, RIGHT: 2 };
var CullFaceNone = 0; var CullFaceNone = 0;
var CullFaceBack = 1; var CullFaceBack = 1;
...@@ -20810,7 +20810,11 @@ ...@@ -20810,7 +20810,11 @@
this.dispose = function () { this.dispose = function () {
window.removeEventListener( 'vrdisplaypresentchange', onVRDisplayPresentChange ); if ( typeof window !== 'undefined' ) {
window.removeEventListener( 'vrdisplaypresentchange', onVRDisplayPresentChange );
}
}; };
...@@ -35904,6 +35908,26 @@ ...@@ -35904,6 +35908,26 @@
return points; 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 @@ ...@@ -36166,13 +36190,13 @@
var PathPrototype = Object.assign( Object.create( CurvePath.prototype ), { 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 @@ ...@@ -36280,6 +36304,16 @@
var lastPoint = curve.getPoint( 1 ); var lastPoint = curve.getPoint( 1 );
this.currentPoint.copy( lastPoint ); this.currentPoint.copy( lastPoint );
},
copy: function ( source ) {
CurvePath.prototype.copy.call( this, source );
this.currentPoint.copy( source.currentPoint );
return this;
} }
} ); } );
...@@ -36299,7 +36333,7 @@ ...@@ -36299,7 +36333,7 @@
if ( points ) { if ( points ) {
this.fromPoints( points ); this.setFromPoints( points );
} }
...@@ -36319,9 +36353,9 @@ ...@@ -36319,9 +36353,9 @@
// STEP 3a - Extract points from each shape, turn to vertices // STEP 3a - Extract points from each shape, turn to vertices
// STEP 3b - Triangulate each shape, add faces. // STEP 3b - Triangulate each shape, add faces.
function Shape() { function Shape( points ) {
Path.apply( this, arguments ); Path.call( this, points );
this.type = 'Shape'; this.type = 'Shape';
...@@ -36347,9 +36381,9 @@ ...@@ -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 { return {
...@@ -36360,9 +36394,21 @@ ...@@ -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 @@ ...@@ -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 ) { function ClosedSplineCurve3( points ) {
console.warn( 'THREE.ClosedSplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead.' ); console.warn( 'THREE.ClosedSplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead.' );
...@@ -43628,6 +43687,12 @@ ...@@ -43628,6 +43687,12 @@
Object.assign( Shape.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 ) { extrude: function ( options ) {
console.warn( 'THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead.' ); console.warn( 'THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead.' );
此差异已折叠。
...@@ -181,7 +181,7 @@ Object.assign( EventDispatcher.prototype, { ...@@ -181,7 +181,7 @@ Object.assign( EventDispatcher.prototype, {
} ); } );
var REVISION = '88dev'; var REVISION = '88';
var MOUSE = { LEFT: 0, MIDDLE: 1, RIGHT: 2 }; var MOUSE = { LEFT: 0, MIDDLE: 1, RIGHT: 2 };
var CullFaceNone = 0; var CullFaceNone = 0;
var CullFaceBack = 1; var CullFaceBack = 1;
...@@ -20804,7 +20804,11 @@ function WebVRManager( renderer ) { ...@@ -20804,7 +20804,11 @@ function WebVRManager( renderer ) {
this.dispose = function () { 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 ), { ...@@ -35898,6 +35902,26 @@ CurvePath.prototype = Object.assign( Object.create( Curve.prototype ), {
return points; 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 ) { ...@@ -36160,13 +36184,13 @@ QuadraticBezierCurve.prototype.copy = function ( source ) {
var PathPrototype = Object.assign( Object.create( CurvePath.prototype ), { 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 ), { ...@@ -36274,6 +36298,16 @@ var PathPrototype = Object.assign( Object.create( CurvePath.prototype ), {
var lastPoint = curve.getPoint( 1 ); var lastPoint = curve.getPoint( 1 );
this.currentPoint.copy( lastPoint ); 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 ) { ...@@ -36293,7 +36327,7 @@ function Path( points ) {
if ( points ) { if ( points ) {
this.fromPoints( points ); this.setFromPoints( points );
} }
...@@ -36313,9 +36347,9 @@ PathPrototype.constructor = Path; ...@@ -36313,9 +36347,9 @@ PathPrototype.constructor = Path;
// STEP 3a - Extract points from each shape, turn to vertices // STEP 3a - Extract points from each shape, turn to vertices
// STEP 3b - Triangulate each shape, add faces. // STEP 3b - Triangulate each shape, add faces.
function Shape() { function Shape( points ) {
Path.apply( this, arguments ); Path.call( this, points );
this.type = 'Shape'; this.type = 'Shape';
...@@ -36341,9 +36375,9 @@ Shape.prototype = Object.assign( Object.create( PathPrototype ), { ...@@ -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 { return {
...@@ -36354,9 +36388,21 @@ Shape.prototype = Object.assign( Object.create( PathPrototype ), { ...@@ -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, { ...@@ -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 ) { function ClosedSplineCurve3( points ) {
console.warn( 'THREE.ClosedSplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead.' ); console.warn( 'THREE.ClosedSplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead.' );
...@@ -43622,6 +43681,12 @@ Object.assign( Ray.prototype, { ...@@ -43622,6 +43681,12 @@ Object.assign( Ray.prototype, {
Object.assign( Shape.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 ) { extrude: function ( options ) {
console.warn( 'THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead.' ); console.warn( 'THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead.' );
......
{ {
"name": "three", "name": "three",
"version": "0.87.1", "version": "0.88.0",
"description": "JavaScript 3D library", "description": "JavaScript 3D library",
"main": "build/three.js", "main": "build/three.js",
"repository": "mrdoob/three.js", "repository": "mrdoob/three.js",
......
export var REVISION = '88dev'; export var REVISION = '88';
export var MOUSE = { LEFT: 0, MIDDLE: 1, RIGHT: 2 }; export var MOUSE = { LEFT: 0, MIDDLE: 1, RIGHT: 2 };
export var CullFaceNone = 0; export var CullFaceNone = 0;
export var CullFaceBack = 1; export var CullFaceBack = 1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册