The InterleavedBufferAttribute objects seems to miss the needsUpdate setter/getter for increasing the internal version counter.
To be able to trigger an re-upload of the data to the GPU one will have to increase the Mesh.geometry.attributes.MYBUFFER.data.version counter by hand.
Would you like to do a PR with the fix?
Bump up - needsupdate is still not implement on interleavedBuffer but written in his documentation.
For THREE.InterleavedBufferAttribute, this is the pattern to use:
mesh.geometry.attributes.position.data.needsUpdate = true;
Thanks @WestLangley !
I realize the InterleavedBufferAttributes were all link to their THREE.InterleavedBuffer which is the stuffs to actually update and setup drawrange for interleaved, maybe a note about it in the documentation would be good.
This is problematic when using TypeScript types, as the compiler can not know if the buffer attribute has needsUpdate or not:
TS2339: Property 'needsUpdate' does not exist on type 'BufferAttribute | InterleavedBufferAttribute'.
Property 'needsUpdate' does not exist on type 'InterleavedBufferAttribute'.
There should be a needsUpdate on InterleavedBufferAttribute just as on BufferAttribute.
My only workaround is using an instanceof check:
// Passes TypeScript compiler:
if (positionAttribute instanceof THREE.InterleavedBufferAttribute) {
positionAttribute.data.needsUpdate = true;
} else {
positionAttribute.needsUpdate = true;
}