I am trying to convert non-indexed geometry to indexed geometry using “BufferGeometryUtils.mergeVertices” in typeScript.
But error occcured
“Property ‘mergeVertices’ does not exist on type ‘typeof BufferGeometryUtils’”
I am trying to convert non-indexed geometry to indexed geometry using “BufferGeometryUtils.mergeVertices” in typeScript.
But error occcured
“Property ‘mergeVertices’ does not exist on type ‘typeof BufferGeometryUtils’”
mergeVertices()
is a method of BufferGeometryUtils
, not a property.
Please see this, I have used it as method
BufferGeometryUtils.mergeVertices(obj.children[0].geometry)
found my error.
I am importing BufferGeometryUtils from three instead of utils
it should be imported from
import * as BufferGeometryUtils from 'three/addons/utils/BufferGeometryUtils.js';
Yes. Initially three js exporting whole BufferGeometryUtils class.
Now three js exporting individuals functions,