소스 검색

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 );
 
 	}