three.js创建多个几何体对象时线条重合不显示问题

在使用three.js的BufferGeometry创建多个几何体对象时,或许是因为线条重合而不显示

function createBufferGeometry(box, color) {
    const geometry = new THREE.BufferGeometry();
    const vertices = [{},{},{}...,{}];
    const attribue = new THREE.BufferAttribute(vertices, 3);
    geometry.attributes.position = attribue;
    const material1 = new THREE.LineBasicMaterial({
        color: color
    });
    points = new THREE.Line(geometry, material1);
    scene.add(points);
}
运行结果及详细报错内容

img

尝试过给points设置位置

points.position.set(1, 1, 1);

这个方式可以但不是最好的解决方案,局限性很大,会出现别的问题。