I’ve got a mesh whose edges I highlight. the problem is edges with a certain angle between two surfaces aren’t as visible as the others, what could I do here? I’m currently using LineMaterial and WireframeGeometry2
It seems the lines you are missing are the objects intersections, not lines pertaining to the objects geometry.
You could use a CSG (a.k.a. boolean operation) plugin or library. There are some of them for Three.js. Then you do the union operation between all parts of your object, and the missing lines will show up on the resulting object.
You are creating 3 edges for each original edge, because you are defining a Face3. Perhaps it is related to the visual problem. This way you only define one edge:
...
let lineGeometry = new THREE.BufferGeometry()
let verts = [ p1.x, p1.y, p1.z, p2.x, p2.y, p2.z ];
lineGeometry.setAttribute( 'position', new Float32BufferAttribute( verts, 3 ) );
let geoWireframe = new WireframeGeometry2( lineGeometry );
...
Thanks, but the result is the same. Is there somehow an order that I could edit, which decides which mesh should be in front if there are multiple meshes at the same spot? Such as layers in other frameworks