I've read the document here, and from previous question, I can see
The setIndex function is used to specify triangle indices that reference the vertex attribute buffers on the BufferGeometry.
I think I understand 50% of these concepts, but in this interleaved example, (code is here) What is the purpose of setting index (I know it is specifying triangle indices)? but why?
var indices = new Uint16Array( [
0, 1, 2,
2, 1, 3,
4, 5, 6,
6, 5, 7,
8, 9, 10,
10, 9, 11,
12, 13, 14,
14, 13, 15,
16, 17, 18,
18, 17, 19,
20, 21, 22,
22, 21, 23
] );
geometry.setIndex( new THREE.BufferAttribute( indices, 1 ) );
My understanding is there are 24 vertexes, and the set index tells the renderer to use vertex at a specific index (not natural order) to arrange a triangle. But why is a new arrangement needed? Do I have to do setIndex every time in my own code?