浏览代码

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
 
 		}