When working with BufferAttributes in threejs, I encountered a scenario where I needed to delete a specific attribute without affecting others. The initial setup looked something like this:
geometry.setAttribute("xxx", new THREE.BufferAttribute(new Float32Array(array), 3))
I tried deleting the attribute using the following code:
geometry.deleteAttribute("xxx")
However, even after setting the needUpdate value as true, it appeared that the data still remained in memory on the GPU.
This led me to explore ways of dynamically managing attributes within a geometry in threeJs.