xeokit-sdk
xeokit-sdk copied to clipboard
[FIX] SceneModelEntity primitive count broken (NaN)
Use mesh.numTriangles instead of unknown mesh.numPrimitives to compute sceneModelEntity.numPrimitives. Maybe it works in some scenario if numPrimitives was added by parser or something else, but in my case it was broken loading LAZ (point cloud) models. Indeed, as sceneModelMesh is undefined, the computed numPrimitives is NaN .