Three.js remove holes / inner lines in LineSegments

273 Views Asked by At

I create a Buffergeometry with my data and extract LineSegments to only show the outer lines:

const geometry = new THREE.BufferGeometry();
geometry.setAttribute('position', new THREE.BufferAttribute(vertices, 3));
const edges = new THREE.EdgesGeometry(geometry);
const line = new THREE.LineSegments(edges, new THREE.LineBasicMaterial({ color: 0xc4eaff }));

Because there's an 'hole' in the data, I get e result something like this: enter image description here

Is there an easy way to remove the inner lines in my LineSegments to get e result like this: enter image description here

0

There are 0 best solutions below