Updating Indices of a Mesh: `updateIndices` vs ` setVerticesBuffer`

I’m making a 3d room and want to offer the ability to hide any number of walls at once. Naively, I would think that I can keep the mesh positions untouched and simply update the vertices to include or remove the facets corresponding to a given wall in the mesh to show/hide a wall.

I’m seeing these two methods in the docs and was hoping to get some clarity around their differences and if one is more appropriate for my circumstances? Thanks!


Hey the vertex buffer is the current geometry meaning the list of vertices.
The indices are the definition of each face, so literally an array of triplets (a, b,c where each number is the index of a vertex in the vertex buffer)

So in your case it seems that the updateIndices is the way to go :wink:

3 Likes

Hello @nerdsrock just checking in, was your question answered?

It was! Realized that I forgot to mark the question as solved. Thanks for the bump!