BufferGeometryUtils geometry.getIndex is not a function error

Hi all, I’ve been trying to use the mergeVertices function from BufferGeometryUtils, however it keeps returning that geometry.getIndex is not a function. I have used vite to import three and I have used the exact method of importing BufferGeometryUtils that is mentioned in the documentation. Any help or suggestions would be appreciated

Each instance of BufferGeometry has a getIndex() method. Maybe your are not passing an object of type BufferGeometry to mergeVertices()?

2 Likes

Thank you, this was the problem. I only passed mesh, not mesh.geometry. Everything is working great now