소스 검색

fix LineSegmentsGeometry.fromLineSegements and LineGeometry.fromLine

webglzhang 5 년 전
부모
커밋
ddc8e60dcf
2개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      examples/js/lines/LineGeometry.js
  2. 1 1
      examples/js/lines/LineSegmentsGeometry.js

+ 1 - 1
examples/js/lines/LineGeometry.js

@@ -77,7 +77,7 @@ THREE.LineGeometry.prototype = Object.assign( Object.create( THREE.LineSegmentsG
 
 		} else if ( geometry.isBufferGeometry ) {
 
-			this.setPositions( geometry.position.array ); // assumes non-indexed
+			this.setPositions( geometry.attributes.position.array ); // assumes non-indexed
 
 		}
 

+ 1 - 1
examples/js/lines/LineSegmentsGeometry.js

@@ -143,7 +143,7 @@ THREE.LineSegmentsGeometry.prototype = Object.assign( Object.create( THREE.Insta
 
 		} else if ( geometry.isBufferGeometry ) {
 
-			this.setPositions( geometry.position.array ); // assumes non-indexed
+			this.setPositions( geometry.attributes.position.array ); // assumes non-indexed
 
 		}