setPositions method

LineSegmentsGeometry setPositions(
  1. Float32Array lineSegments
)

Implementation

LineSegmentsGeometry setPositions(Float32Array lineSegments ) {
	final instanceBuffer = new InstancedInterleavedBuffer( lineSegments, 6, 1 ); // xyz, xyz

	this.setAttributeFromString( 'instanceStart', new InterleavedBufferAttribute( instanceBuffer, 3, 0 ) ); // xyz
	this.setAttributeFromString( 'instanceEnd', new InterleavedBufferAttribute( instanceBuffer, 3, 3 ) ); // xyz

	this.computeBoundingBox();
	this.computeBoundingSphere();

	return this;
}