Missing line when passing edgeGeometry to wireframeGeometry2

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