I am using Typescript with THREE.
I recently upgraded THREE
to r114, and realized that setDynamic(true | false)
on BufferAttribute
is now deprecated. I then switched to the newer syntax:
// before
geometry.attributes.position.setDynamic(true);
// after
geometry.attributes.position.setUsage(THREE.DynamicDrawUsage);
But my compiler started complaining:
Property 'setUsage' does not exist on type 'BufferAttribute | InterleavedBufferAttribute'.
Property 'setUsage' does not exist on type 'InterleavedBufferAttribute'. TS2339
What are my options around this?