Currently, I am facing an issue with changing vertex positions in my mesh using three js. It appears that three js stores duplicates for each vertex in the mesh. In my specific scenario, I have 4 duplicates of a vertex, and when I modify one using mesh.geometry.vertices[i]
, the changes only apply to that single vertex. The other duplicates remain unaffected. I attempted to rectify this by utilizing mesh.geometry.mergeVertices();
, which successfully reduces the number of positions in the geometry.vertices
array by a factor of 4. However, the underlying issue persists as the duplicates are not eliminated from the geometry displayed on the screen. So, my question is, how can I update the vertex position for every duplicate, for instance, in a box, and have all the duplicates automatically reflect the changes? I have provided some debug images to illustrate the problem: vertices array after mergeVertices(), actual geometry array