浏览代码

Line: Nicer backwards compatibility for THREE.LinePieces.

Mr.doob 10 年之前
父节点
当前提交
f627040913
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/objects/Line.js

+ 2 - 1
src/objects/Line.js

@@ -6,7 +6,8 @@ THREE.Line = function ( geometry, material, mode ) {
 
 	if ( mode === 1 ) {
 
-		console.error( 'THREE.Line: THREE.LinePieces mode has been removed. Use THREE.LineSegments instead.' );
+		console.warn( 'THREE.Line: parameter THREE.LinePieces no longer supported. Created THREE.LineSegments instead.' );
+		return new THREE.LineSegments( geometry, material );
 
 	}