I am implementing a custom cityscape scene in Three.js. I need to render a lot of the same geometries and to increase speed I have implemented InstanceMesh.
For normal meshes, I have used this code to add wireframes to all meshes:
// material is created elsewhere
var geo = new THREE.CylinderGeometry(1, 1, item.height, 16, 16);
var mesh = new THREE.Mesh(geo, this.createMaterial(object.material));
scene.add( mesh );
// creating wireframes
var edgegeo = new THREE.EdgesGeometry( geo );
var wire = new THREE.LineSegments( edgegeo, this.createMaterial("wire") );
scene.add( wire );
This also seemed to work:
mesh.add(wire)
Unfortunately, this does not work for instanced meshes since there does not seem to be an instanced version of LineSegments? How would I approach this problem?
Any help appreciated. Thanks.