Closed vorg closed 10 months ago
Another option would be to specify type, constructor or provide initial indices array in anticipation of big vertex count.
createGeomBuilder({ positions: 3, colors: 4, cells: { size: 3, type: Uint32Array } })
Another option would be to specify type, constructor or provide initial indices array in anticipation of big vertex count.
createGeomBuilder({ positions: 3, colors: 4, cells: { size: 3, type: Uint32Array } })
I have my typed-array-constructor for that purpose.
Wanna patch it here?
And if we will use it i suggest a bit more readable syntax
new (typedArrayConstructor(indexCount * 2))(10); //anticipating next resize
vs
const DetectedArrayType = typedArrayConstructor(indexCount * 2) //anticipating next resize
indicesArray = new DetectedArrayType(10);
It is possible to build mesh with more than 64k vertices that creates clamped indices due to Uint16Array array for cell. Either we should switch to Uint32Array or upgrade to it once positionsIndex is above 60k