I’m trying to understand this example:
https://playground.babylonjs.com/#T40FK
specifically the near final lines:
box.subMeshes=[];
var verticesCount=box.getTotalVertices();
box.subMeshes.push(new BABYLON.SubMesh(0, 0, verticesCount, 0, 6, box));
box.subMeshes.push(new BABYLON.SubMesh(1, 1, verticesCount, 6, 6, box));
box.subMeshes.push(new BABYLON.SubMesh(2, 2, verticesCount, 12, 6, box));
box.subMeshes.push(new BABYLON.SubMesh(3, 3, verticesCount, 18, 6, box));
box.subMeshes.push(new BABYLON.SubMesh(4, 4, verticesCount, 24, 6, box));
box.subMeshes.push(new BABYLON.SubMesh(5, 5, verticesCount, 30, 6, box));
I understand SubMesh’s first constructor parameter is identifying the material to use. I understand that params 4-5 define which indices in the parent mesh’s vertex data the sub mesh constitutes. But I’m not sure what is going on with params 2-3: verticiesStart and verticiesCount. Can someone please expand on their use?