Hey all,
I am currently working on a project which requires the edges of the meshes to have fat lines. To achieve this, I was using wireframeGeometry2 and passing the mesh geometry which logically renders all the edges as fat lines. As I only need the edges, I am trying to push the edgesGeometry from the mesh geometry to wireframeGeometry2 which works perfectly… almost.
My issue is that for each of the meshes it always misses one edge in rendering as seen below
Has anyone experienced this issue before?
cheers!
I’m afraid what you are trying to do does not work. EdgesGeometry
expects a mesh geometry (with face definitions) and represents a geometry for lines. This is also true for WireframeGeometry
. It’s not supported to use an instance of EdgesGeometry
as an argument for WireframeGeometry
(since it only works with mesh geometries). Since WireframeGeometry2
depends on WireframeGeometry
, the result is the expected behavior. However, you can solve the issue like so:
var boxGeometry = new THREE.BoxBufferGeometry();
var edgesGeometry = new THREE.EdgesGeometry( boxGeometry );
var lineGeometry = new LineSegmentsGeometry().fromEdgesGeometry( edgesGeometry );
https://jsfiddle.net/pu8htsoe/2/
3 Likes
Hey @Mugen87 thanks for the response. Will try this approach
Thanks so much - that’s working perfectly!
1 Like