Right now the Mesh constructor always creates an empty index buffer, and there is no way to to create a mesh without an index buffer.
I think it should be null by default, and only when setting index data should it be created.
Similarly, setIndexData should probably take null as a value, causing the index buffer to be removed.
Also the WebGPU renderer doesn't really handle this case well.
Right now the
Mesh
constructor always creates an empty index buffer, and there is no way to to create a mesh without an index buffer. I think it should benull
by default, and only when setting index data should it be created. Similarly,setIndexData
should probably takenull
as a value, causing the index buffer to be removed.Also the WebGPU renderer doesn't really handle this case well.