Basically its like only old study table. So i have the top as seperate geometry and bottom four leg as seperate geometry and i am merging to get one study table. So now in my use case i only want to position the top of the table into the mesh it is possible
By submesh I meant a mesh within a Group. If you merge geometries there are no submeshes any more - your entire geometry becomes one, a bit hard to modify, mesh.
Instead of merging geometries try this:
const tableTop = new Three.Mesh(...); // Model of the top of the table
const tableLeg1 = new Three.Mesh(...); // Model of legs
const tableLeg2 = new Three.Mesh(...); // Model of legs
const tableLeg3 = new Three.Mesh(...); // Model of legs
const tableLeg4 = new Three.Mesh(...); // Model of legs
const table = new Three.Group();
table.add(tableTop);
table.add(tableLeg1);
table.add(tableLeg2);
table.add(tableLeg3);
table.add(tableLeg4);
scene.add(table);
// You can now modify the position of the entire table model using the group:
table.position.set(0, 10, 0);
// And you can modify the position of each part of the table within the group:
tableTop.position.y -= 1.0; // This will move the top of the table by 1.0 downwards, within the table group, making the table lower.
What I meant is that you don’t have any “submeshes” after you merge the geometry. You have a single mesh, with a single geometry.
The only way to access and modify it, would probably be by manually editing the geometry buffer position attribute for vertices you want to move. Which is not very practical, unless you know exactly which vertices belong to the top of the table.