Thanks for such a prompt reply. So I tried mergeBufferGeometries()
as follows but all of the items appear in the same location. Performance doesn’t seen great either. I must be missing something obvious:
// Get the objects.
const importedObjects: THREE.Object3D = scene.getObjectByName("Part_Group");
// Check we have found the Objects.
if (importedObjects !== null) {
// Create an empty Object to hold the Geometry.
const geometryArray = [];
// Create a material.
const objectMaterial = new THREE.MeshLambertMaterial({ color: 0xffff00, side: THREE.DoubleSide })
// Iterate through the children
importedObjects.children.forEach(child => {
if (child instanceof THREE.Mesh) {
geometryArray.push(child.geometry);
}
});
let mergedGeom = new THREE.BufferGeometry();
mergedGeom = BufferGeometryUtils.mergeBufferGeometries(geometryArray);
// Create an object3D from the tundishes Geometry.
const mergedMesh = new THREE.Mesh(mergedGeom, objectMaterial);
// Add the tundishes to the scene.
this.sceneMaster.add(mergedMesh);