Browse Source

update LineGeometry.js,LineSegmentsGeometry.js and LineSegmentsGeometry.d.ts in the jsm directory.

webglzhang 5 years ago
parent
commit
a3eceb2936

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

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

+ 1 - 1
examples/jsm/lines/LineSegmentsGeometry.d.ts

@@ -16,7 +16,7 @@ export class LineSegmentsGeometry extends InstancedBufferGeometry {
 	computeBoundingBox(): void;
 	computeBoundingSphere(): void;
 	fromEdgesGeometry( geometry: WireframeGeometry ): this;
-	fromLineSegements( lineSegments: LineSegments ): this;
+	fromLineSegments( lineSegments: LineSegments ): this;
 	fromMesh( mesh: Mesh ): this;
 	fromWireframeGeometry( geometry: EdgesGeometry ): this;
 	setColors( array: number[] | Float32Array ): this;

+ 2 - 2
examples/jsm/lines/LineSegmentsGeometry.js

@@ -144,7 +144,7 @@ LineSegmentsGeometry.prototype = Object.assign( Object.create( InstancedBufferGe
 
 	},
 
-	fromLineSegements: function ( lineSegments ) {
+	fromLineSegments: function ( lineSegments ) {
 
 		var geometry = lineSegments.geometry;
 
@@ -154,7 +154,7 @@ LineSegmentsGeometry.prototype = Object.assign( Object.create( InstancedBufferGe
 
 		} else if ( geometry.isBufferGeometry ) {
 
-			this.setPositions( geometry.position.array ); // assumes non-indexed
+			this.setPositions( geometry.attributes.position.array ); // assumes non-indexed
 
 		}