setPositions method
dynamic
setPositions(
- dynamic array
Implementation
setPositions(array) {
var lineSegments;
if (array is Float32Array) {
lineSegments = array;
} else if (array is List) {
lineSegments = Float32Array.from(List<double>.from(array));
}
var instanceBuffer =
new InstancedInterleavedBuffer(lineSegments, 6, 1); // xyz, xyz
this.setAttribute('instanceStart',
new InterleavedBufferAttribute(instanceBuffer, 3, 0, false)); // xyz
this.setAttribute('instanceEnd',
new InterleavedBufferAttribute(instanceBuffer, 3, 3, false)); // xyz
//
this.computeBoundingBox();
this.computeBoundingSphere();
return this;
}